app_snackbar 1.0.4 copy "app_snackbar: ^1.0.4" to clipboard
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

  • icon param added to show(), success(), error(), warning(), info(), showWithAction(), showLoading()
  • Priority chain: per-call iconAppSnackBarTheme icon → 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 CircularProgressIndicator if not provided
  • Example: AppSnackBar.showLoading(context, 'Uploading...', progressIndicator: LinearProgressIndicator())

Per-call Queue Override

  • useQueue param added to all public methods
  • Priority chain: per-call useQueueAppSnackBar.useQueue (global)
  • Example: AppSnackBar.error(context, 'Critical!', useQueue: false)

Top Position Fix

  • SnackBarPosition.top now correctly renders at the top on all devices
  • Root cause: ScaffoldMessenger always renders at bottom regardless of margin
  • Fix: top position now always forces overlay mode, bypassing ScaffoldMessenger entirely

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 snackbar
  • timerColor — customize the timer bar color per-call
  • AppSnackBarTheme.showTimer — enable timer globally for all snackbars
  • AppSnackBarTheme.timerColor — set default timer bar color in theme

Duration Control

  • AppSnackBarTheme.defaultDuration — set a global default duration once in theme
  • Per-call duration always 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/out
  • SnackBarAnimation.none — instant appear/disappear
  • Configurable animationDuration via theme

Queue

  • AppSnackBar.useQueue = true — show snackbars one after another
  • AppSnackBar.clearQueue() — cancel all pending snackbars
  • AppSnackBar.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 null as context to use key automatically

Customization (per-call overrides)

  • backgroundColor — custom color for one snackbar
  • textStyle — full text style override
  • fontSize — quick font size override
  • borderRadius — shape override
  • elevation — shadow depth override
  • margin — spacing override
  • leading — custom icon/avatar widget
  • trailing — custom close/action widget
  • showClose — 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+
1
likes
160
points
176
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

Beautiful, customizable Flutter SnackBar with 4 types, animations, queue, timer bar, action buttons, loading states, and Material 3 support.

Repository (GitHub)
View/report issues

Topics

#snackbar #ui #notification #material #overlay

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on app_snackbar