Android and iOS Toast Library for Flutter
If you dont want to use androidx then use
# add this line to your dependencies fluttertoast: ^3.1.0
Fluttertoast.showToast( msg: "This is Center Short Toast", toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.CENTER, timeInSecForIos: 1, backgroundColor: Colors.red, textColor: Colors.white, fontSize: 16.0 );
|msg||String (Not Null)(required)|
|toastLength||Toast.LENGTH_SHORT or Toast.LENGTH_LONG (optional)|
|gravity||ToastGravity.TOP (or) ToastGravity.CENTER (or) ToastGravity.BOTTOM|
|timeInSecForIos||int (only for ios)|
Demonstrates how to use the fluttertoast plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: fluttertoast: ^3.1.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Aug 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
flutter format to format
Support latest dependencies. (-10 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 1 dependency (
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.