app_snackbar 1.0.2
app_snackbar: ^1.0.2 copied to clipboard
A beautiful, fully customizable Flutter SnackBar utility. Supports 4 types, action buttons, loading states, queue management, slide/fade animations, and top/bottom positioning with Material 3 support.
1.0.2 #
✨ New Features #
Timer Bar
showTimer— shows a countdown progress bar at the bottom of the snackbartimerColor— customize the timer bar color per-callAppSnackBarTheme.showTimer— enable timer globally for all snackbarsAppSnackBarTheme.timerColor— set default timer bar color in theme
Duration Control
AppSnackBarTheme.defaultDuration— set a global default duration once in theme- Per-call
durationalways takes priority over theme default - Fallback chain: per-call → theme default → built-in default (3s)
1.0.1 #
🐛 Bug Fix #
- Fixed: showing a new snackbar while one was already visible caused the old one to be abruptly removed at the same time, resulting in both dismissing together — now the old snackbar cleanly finishes before the new one appears
1.0.0 #
✨ Initial stable release #
Types
- 4 snackbar types:
success,error,warning,info - Shortcut methods:
AppSnackBar.success(),.error(),.warning(),.info()
Actions & Loading
AppSnackBar.showWithAction()— inline action chip (Undo, Retry, etc.)AppSnackBar.showLoading()— circular spinner for async operations
Animation
SnackBarAnimation.slide— slides in from bottom/top (default)SnackBarAnimation.fade— smooth fade in/outSnackBarAnimation.none— instant appear/disappear- Configurable
animationDurationvia theme
Queue
AppSnackBar.useQueue = true— show snackbars one after anotherAppSnackBar.clearQueue()— cancel all pending snackbarsAppSnackBar.queueLength— check pending count
Positioning
SnackBarPosition.bottom(default)SnackBarPosition.top— shows above bottom sheets
rootScaffoldMessengerKey support
AppSnackBar.messengerKey = myKey— always visible above bottom sheets- Pass
nullas context to use key automatically
Customization (per-call overrides)
backgroundColor— custom color for one snackbartextStyle— full text style overridefontSize— quick font size overrideborderRadius— shape overrideelevation— shadow depth overridemargin— spacing overrideleading— custom icon/avatar widgettrailing— custom close/action widgetshowClose— toggle close button
Global Theme
AppSnackBarTheme— set once, applies everywhere- Per-type color, icon, textStyle, borderRadius, elevation, animation
Platform
- Flutter 3.16+ / Material 3
- Dart 3.2+