talira

fluttertoast

Toast messages for Flutter in a single line of code

open sourceMITfree

fluttertoast is a Flutter package for showing toast messages. It has two kinds: a toast with no BuildContext, for Android, iOS and the web (where it uses Toastify-JS), with fewer features and no control over the UI; and a toast that takes a BuildContext, which works on every platform and gives full control of the toast, queues toasts, and can remove one or clear the queue. Options cover the message, duration, position, colors, font size and font asset.

Problems it solves

  • show a short toast message in a Flutter app
  • queue several notification toasts in Flutter and clear them
  • show a toast from Flutter code that has no BuildContext

Features

  • Toast without a BuildContext on Android, iOS and the web
  • Toast with a BuildContext on every platform, with full control of its UI
  • Queued toasts, with removing one or clearing the queue
  • Position, duration, colors, font size and custom font asset options

Limitations

  • On Android 11 and later a custom toast without a BuildContext uses only the message and length, ignoring the other properties1

Alternatives

The same job

These do what fluttertoast does.

  1. Flutter EasyLoading Loading, progress and toast overlays for Flutter without a BuildContext

Compare fluttertoast with the top 3