swift_alert 2.0.0 copy "swift_alert: ^2.0.0" to clipboard
swift_alert: ^2.0.0 copied to clipboard

Beautiful, customizable notification banners for Flutter. Show alerts anywhere without context after one-time initialization.

2.0.0 #

Breaking Changes:

  • Added new SwiftAlert.initialize() method that must be called at app startup with a GlobalKey<NavigatorState>
  • Introduced new SwiftAlert.show() method that doesn't require context parameter
  • Deprecated SwiftAlert.display() method (still works for backward compatibility)

New Features:

  • No context required after initialization - show alerts from anywhere in your app
  • Perfect for use in state management layers, services, and business logic
  • Initialize once at app startup and use throughout your app
  • Improved error messages when SwiftAlert is not properly initialized

Documentation:

  • Comprehensive README with migration guide
  • Updated example app demonstrating new API
  • Added troubleshooting section
  • Detailed API reference

Migration Guide: To migrate from v1.x to v2.0.0:

  1. Create a global navigator key: final navigatorKey = GlobalKey<NavigatorState>()
  2. Initialize SwiftAlert in main(): SwiftAlert.initialize(navigatorKey: navigatorKey)
  3. Pass the key to MaterialApp: MaterialApp(navigatorKey: navigatorKey, ...)
  4. Replace SwiftAlert.display(context, ...) with SwiftAlert.show(...)

1.0.0 #

  • Initial stable release of SwiftAlert.
  • Display beautiful, animated notification banners at the top of the screen.
  • Supports multiple notification types: success, error, info, warning.
  • Customizable appearance, icons, and colors.
  • Easy integration with any Flutter app.
  • Includes example app and screenshots.
  • BSD 3-Clause License.
1
likes
160
points
10
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Beautiful, customizable notification banners for Flutter. Show alerts anywhere without context after one-time initialization.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on swift_alert