app_snackbar 1.0.4
app_snackbar: ^1.0.4 copied to clipboard
Beautiful, customizable Flutter SnackBar with 4 types, animations, queue, timer bar, action buttons, loading states, and Material 3 support.
1.0.4 #
✨ New Features #
Per-call Icon Override
iconparam added toshow(),success(),error(),warning(),info(),showWithAction(),showLoading()- Priority chain: per-call
icon→AppSnackBarThemeicon → built-in default - Example:
AppSnackBar.success(context, 'Done!', icon: Icons.cloud_done_rounded)
Action Icon in showWithAction()
actionIcon— optional icon shown left of the action button label- If null, only the label text is shown (no breaking change)
- Example:
AppSnackBar.showWithAction(context, 'Deleted', actionLabel: 'UNDO', actionIcon: Icons.undo_rounded, onAction: restore)
Custom Progress Indicator in showLoading()
progressIndicator— pass any widget (CircularProgressIndicator, LinearProgressIndicator, Lottie, etc.)- Falls back to default white
CircularProgressIndicatorif not provided - Example:
AppSnackBar.showLoading(context, 'Uploading...', progressIndicator: LinearProgressIndicator())
Per-call Queue Override
useQueueparam added to all public methods- Priority chain: per-call
useQueue→AppSnackBar.useQueue(global) - Example:
AppSnackBar.error(context, 'Critical!', useQueue: false)
Top Position Fix
SnackBarPosition.topnow correctly renders at the top on all devices- Root cause:
ScaffoldMessengeralways renders at bottom regardless of margin - Fix: top position now always forces overlay mode, bypassing
ScaffoldMessengerentirely
1.0.3 #
✨ Documentation Fix #
- Fixed: screenshots not showing on pub.dev — replaced HTML [] tags with GitHub raw URLs
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+
