flashy_flushbar 1.0.0 copy "flashy_flushbar: ^1.0.0" to clipboard
flashy_flushbar: ^1.0.0 copied to clipboard

A highly customizable, dismissible, and animated flushbar (toast) for Flutter applications.

Flashy Flushbar #

A highly customizable, dismissible and animated flushbar (toast) for Flutter applications.

Features #

  • Customize the appearance with various options.
  • Animated entrance and exit transitions.
  • Support for dismissible flushbars.
  • Easily show and hide flushbars programmatically.

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  flashy_flushbar: ^1.0.0

Then run:

flutter pub get

Usage #

Import the package in your Dart code:

import 'package:flashy_flushbar/flashy_flushbar.dart';

To make the context accessible, wrap your app with FlashyFlushbarProvider in the widget tree:

void main() {
  runApp(
    FlashyFlushbarProvider(
      child: MyApp(),
    ),
  );
}

Now you can use FlashyFlushbar in your Flutter app. Here's a basic example:

FlashyFlushbar(
  leadingWidget: const Icon(
    Icons.error_outline,
    color: Colors.black,
    size: 24,
  ),
  message: 'Hello from Flashy Flushbar',
  duration: const Duration(seconds: 1),
  trailingWidget: IconButton(
    icon: const Icon(
      Icons.close,
      color: Colors.black,
      size: 24,
    ),
    onPressed: () {
      FlashyFlushbar.cancel();
    },
  ),
  isDismissible: false,
).show();

To cancel the last displayed flushbar:

FlashyFlushbar.cancel();

To cancel all active flushbars:

FlashyFlushbar.cancelAll();

Example #

For a complete example, see the example folder in this repository.

7
likes
0
pub points
78%
popularity

Publisher

unverified uploader

A highly customizable, dismissible, and animated flushbar (toast) for Flutter applications.

Repository (GitHub)
View/report issues

Topics

#flutter-toast #flutter-snackbar #flutter-flushbar #custom-flutter-snackbar #custom-flutter-toast

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flashy_flushbar