hyper_snackbar 0.3.1
hyper_snackbar: ^0.3.1 copied to clipboard
A highly customizable and animated snackbar package for Flutter.
0.3.1 - 2026-01-08 #
- FIX: Ensures the scrollbar always appears at the right edge of the card, even for short messages on wide screens.
- DOCS: Updated README images to use absolute URLs for better compatibility with pub.dev.
0.3.0 #
- FEAT: Added
actionAlignmentparameter to control the horizontal alignment of the action button (Right, Center, Left). - FEAT: Added
contentparameter to support arbitrary Widgets as footer content (replacing the standard action button). - FEAT: Implemented "Overflow Safety" mechanism. Extremely long messages now automatically become scrollable within a constrained height (max 80% of screen) to prevent UI overflow errors.
- FEAT:
Duration.zeroindisplayDurationis now treated as a persistent snackbar (equivalent tonull). - FIX: Resolved
ScrollControllerrelated crashes by refactoringHyperSnackBarContentto a StatefulWidget. - FIX: Fixed layout issues where the close button would scroll off-screen. The header and footer are now fixed, with only the message body being scrollable.
- FIX: Improved scrollbar positioning to appear at the absolute right edge of the card.
- DOCS: Updated README with examples for new features.
0.2.5 #
New Features #
- Scrollable Message Text: Introduced
scrollableandmessageMaxHeightproperties toshow()andHyperConfig, allowing for scrollable message content within a specified maximum height. When scrolling, the auto-dismiss timer is paused. - Display Mode (Stack vs. Queue): Added
displayModeproperty toshow()andHyperConfig.HyperSnackDisplayMode.stack(default): Shows multiple notifications simultaneously, stacked on top of each other.HyperSnackDisplayMode.queue: Displays notifications one by one, similar to standard Snackbars.
Bug Fixes #
- Swipe Gesture Ghosting: Resolved an issue where a ghost animation could appear when dismissing a snackbar via swipe gesture. The auto-dismiss timer is now properly cancelled when a swipe begins.
Docs #
- Updated
README.mdto include an explanation of the newdisplayModefeature.
0.2.4 #
UI/UX Improvements #
- Action Button Placement: Moved the action button below the message text to improve readability and layout stability on narrower screens.
- Close Button: Aligned the close button to the top-right corner (
CrossAxisAlignment.start) for better aesthetics with multi-line messages. - Typography: Added
TextOverflow.ellipsisto the title (max 1 line) to prevent layout breakage. Action button text is now bold for better visibility.
New Features #
- Message Lines Control: Added
maxLinesparameter toshow()andHyperConfig.- Defaults to
5lines to prevent the snackbar from taking up too much screen space. - Pass
nullto display the full message without truncation.
- Defaults to
- Auto Dismiss Action: Added
autoDismissproperty toHyperSnackAction(defaults totrue). The snackbar will now automatically close when an action is tapped, unless specified otherwise.
0.2.3 #
- Fixed: Resolved a
setState() called during buildruntime error that could occur when triggering a snackbar during a navigation transition (e.g., usinggo_routerwithout aBuildContext). - Improvement: Added
SchedulerBindingphase checks to ensure the overlay is inserted safely after the current frame build is completed. - Tests: Added compatibility tests and examples for
go_router.
0.2.2 #
Added #
- Added
isSnackbarOpenById(String id)to check if a snackbar with a specific ID is currently visible. - Added an
animatedparameter to theclearAll()method to allow choosing whether to dismiss snackbars with an animation. Defaults totrue. - Added an example of using
HyperConfigto the sample app.
Changed #
- The default behavior of
clearAll()has been changed from immediate removal to animated dismissal.
Fixed #
- Stabilized tests related to animations by using
pumpAndSettleto ensure animations are complete before making assertions.
Chore #
- Removed unnecessary dependencies.
- Updated
SECURITY.mdto reflect the currently supported version.
0.2.1 #
🧹 Refactoring #
-
Consolidated
HyperSnackAnimationTypeenum to use unified types (e.g.,topinstead offromToportoTop) for both entry and exit animations. This simplifies animation configuration. -
Enhanced HyperConfig.copyWith: The
HyperConfig.copyWithmethod now supports all properties, significantly improving reusability and flexibility when updating snackbar configurations.
📝 Documentation #
- Internationalization: All Japanese comments across the codebase (
pubspec.yaml,lib/src/*,example/lib/main.dart) have been translated to English. - GitHub Feedback Link: The
README.mdhas been updated to include a GitHub Issues badge, making it easier for users to provide feedback and contribute.
0.2.0 #
⚠️ BREAKING CHANGES #
-
Static API by Default: The
HyperSnackbarclass is now fully static. This makes the API more intuitive and similar to popular packages likeGetX. You no longer need to instantiate it.Before:
HyperSnackbar().show(config);After:
HyperSnackbar.show(...); // With named parameters // Old usage style (with HyperConfig object) is now available via `HyperSnackbar.showFromConfig(config);` -
Simplified
showMethod: The primaryshowmethod no longer takes aHyperConfigobject. Instead, it now accepts named parameters directly, significantly improving ease of use for one-off snackbars.Before:
HyperSnackbar().show(HyperConfig( title: 'Success', message: 'Your file was saved.' ));After:
HyperSnackbar.show( title: 'Success', message: 'Your file was saved.' ); // Old usage style (with HyperConfig object) is now available via `HyperSnackbar.showFromConfig(config);`
✨ Features #
-
Intuitive API: The new static API (
HyperSnackbar.show(...)) is cleaner, requires less boilerplate, and is easier to discover.// The simplest way to show a snackbar: HyperSnackbar.show(title: 'Hello World!'); -
Configuration Reusability: Added the
HyperSnackbar.showFromConfig(config)method. This allows you to create a reusableHyperConfigobject for styles that you use frequently, offering the best of both worlds.// Define a reusable style final myErrorStyle = HyperConfig( backgroundColor: Colors.red, // ... other properties ); // Reuse it anywhere HyperSnackbar.showFromConfig( myErrorStyle.copyWith(title: 'Error 1') ); HyperSnackbar.showFromConfig( myErrorStyle.copyWith(title: 'Error 2') ); -
Updated BuildContext Extension: The
context.showHyperSnackbar()extension has also been updated to use named parameters for a consistent and convenient API.
0.1.3 #
- Improved documentation comments.
0.1.2 #
✨ Features #
- Manual Dismissal: Added
dismissById(String id)to close specific snackbars programmatically. - Clear All: Added
clearAll()to close all visible snackbars at once.
0.1.1 #
- Fix README formatting.
0.1.0 #
⚠️ Breaking Changes #
- Renamed Main Class:
HyperManagerhas been renamed toHyperSnackbarto be more intuitive.
✨ Features #
- Context-less Usage: Added support for showing snackbars without a
BuildContext.- Note: To use this feature, you must assign
HyperSnackbar.navigatorKeyto thenavigatorKeyproperty of yourMaterialApp.
- Note: To use this feature, you must assign
- Hybrid Support: The
showmethod now accepts an optionalcontext. If provided, it uses the local context (ideal for inheriting themes); otherwise, it falls back to the global navigator key. - Extension Method: Added
context.showHyperSnackbar(config)for easier usage within widgets.
0.0.4 #
- Documents update.
0.0.3 #
- Initial complete release.
0.0.2 #
- Update README.md.
- Add Demo.gif
0.0.1 #
- Initial release.
[0.2.4] #
UI/UX Improvements #
- Action Button Placement: Moved the action button below the message text to improve readability and layout stability on narrower screens.
- Close Button: Aligned the close button to the top-right corner (
CrossAxisAlignment.start) for better aesthetics with multi-line messages. - Typography: Added
TextOverflow.ellipsisto the title (max 1 line) to prevent layout breakage. Action button text is now bold for better visibility.
New Features #
- Message Lines Control: Added
maxLinesparameter toshow()andHyperConfig.- Defaults to
5lines to prevent the snackbar from taking up too much screen space. - Pass
nullto display the full message without truncation.
- Defaults to
- Auto Dismiss Action: Added
autoDismissproperty toHyperSnackAction(defaults totrue). The snackbar will now automatically close when an action is tapped, unless specified otherwise.
[0.2.3] #
- Fixed: Resolved a
setState() called during buildruntime error that could occur when triggering a snackbar during a navigation transition (e.g., usinggo_routerwithout aBuildContext). - Improvement: Added
SchedulerBindingphase checks to ensure the overlay is inserted safely after the current frame build is completed. - Tests: Added compatibility tests and examples for
go_router.
[0.2.2] #
Added #
- Added
isSnackbarOpenById(String id)to check if a snackbar with a specific ID is currently visible. - Added an
animatedparameter to theclearAll()method to allow choosing whether to dismiss snackbars with an animation. Defaults totrue. - Added an example of using
HyperConfigto the sample app.
Changed #
- The default behavior of
clearAll()has been changed from immediate removal to animated dismissal.
Fixed #
- Stabilized tests related to animations by using
pumpAndSettleto ensure animations are complete before making assertions.
Chore #
- Removed unnecessary dependencies.
- Updated
SECURITY.mdto reflect the currently supported version.
0.2.1 #
🧹 Refactoring #
-
Consolidated
HyperSnackAnimationTypeenum to use unified types (e.g.,topinstead offromToportoTop) for both entry and exit animations. This simplifies animation configuration. -
Enhanced HyperConfig.copyWith: The
HyperConfig.copyWithmethod now supports all properties, significantly improving reusability and flexibility when updating snackbar configurations.
📝 Documentation #
- Internationalization: All Japanese comments across the codebase (
pubspec.yaml,lib/src/*,example/lib/main.dart) have been translated to English. - GitHub Feedback Link: The
README.mdhas been updated to include a GitHub Issues badge, making it easier for users to provide feedback and contribute.
0.2.0 #
⚠️ BREAKING CHANGES #
-
Static API by Default: The
HyperSnackbarclass is now fully static. This makes the API more intuitive and similar to popular packages likeGetX. You no longer need to instantiate it.Before:
HyperSnackbar().show(config);After:
HyperSnackbar.show(...); // With named parameters // Old usage style (with HyperConfig object) is now available via `HyperSnackbar.showFromConfig(config);` -
Simplified
showMethod: The primaryshowmethod no longer takes aHyperConfigobject. Instead, it now accepts named parameters directly, significantly improving ease of use for one-off snackbars.Before:
HyperSnackbar().show(HyperConfig( title: 'Success', message: 'Your file was saved.' ));After:
HyperSnackbar.show( title: 'Success', message: 'Your file was saved.' ); // Old usage style (with HyperConfig object) is now available via `HyperSnackbar.showFromConfig(config);`
✨ Features #
-
Intuitive API: The new static API (
HyperSnackbar.show(...)) is cleaner, requires less boilerplate, and is easier to discover.// The simplest way to show a snackbar: HyperSnackbar.show(title: 'Hello World!'); -
Configuration Reusability: Added the
HyperSnackbar.showFromConfig(config)method. This allows you to create a reusableHyperConfigobject for styles that you use frequently, offering the best of both worlds.// Define a reusable style final myErrorStyle = HyperConfig( backgroundColor: Colors.red, // ... other properties ); // Reuse it anywhere HyperSnackbar.showFromConfig( myErrorStyle.copyWith(title: 'Error 1') ); HyperSnackbar.showFromConfig( myErrorStyle.copyWith(title: 'Error 2') ); -
Updated BuildContext Extension: The
context.showHyperSnackbar()extension has also been updated to use named parameters for a consistent and convenient API.
0.1.3 #
- Improved documentation comments.
0.1.2 #
✨ Features #
- Manual Dismissal: Added
dismissById(String id)to close specific snackbars programmatically. - Clear All: Added
clearAll()to close all visible snackbars at once.
0.1.1 #
- Fix README formatting.
0.1.0 #
⚠️ Breaking Changes #
- Renamed Main Class:
HyperManagerhas been renamed toHyperSnackbarto be more intuitive.
✨ Features #
- Context-less Usage: Added support for showing snackbars without a
BuildContext.- Note: To use this feature, you must assign
HyperSnackbar.navigatorKeyto thenavigatorKeyproperty of yourMaterialApp.
- Note: To use this feature, you must assign
- Hybrid Support: The
showmethod now accepts an optionalcontext. If provided, it uses the local context (ideal for inheriting themes); otherwise, it falls back to the global navigator key. - Extension Method: Added
context.showHyperSnackbar(config)for easier usage within widgets.
0.0.4 #
- Documents update.
0.0.3 #
- Initial complete release.
0.0.2 #
- Update README.md.
- Add Demo.gif
0.0.1 #
- Initial release.
