toast_view 0.0.4 copy "toast_view: ^0.0.4" to clipboard
toast_view: ^0.0.4 copied to clipboard

A pure flutter toast library, support custom style/widget, easy achieve the same effect with native toasts.

Flutter ToastView Plugin #

ToastView pub package GitHub GitHub stars

Usage #

1. Add library to your pubspec.yaml #

latest version: pub package

dependencies:
  toast_view: ^latest_version

2. Import library in dart file #

import "package:toast_view/toast_view.dart";

3. Wrap your app widget #

ToastView(
  /// set toast style, optional
  child:MaterialApp()
);

Tips: If you happened error like: No MediaQuery widget found, you can try to use this code to include ToastView to your App.

MaterialApp(
  builder: (BuildContext context, Widget? widget) {
    return ToastView(child: widget);
  },
);

4. Call method showToast #

showToast('content');

// position and second have default value, is optional

showToastWidget(Text('hello ToastView'));
0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

A pure flutter toast library, support custom style/widget, easy achieve the same effect with native toasts.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on toast_view