FlutterToast class

A class for displaying custom toasts in a Flutter application.

Constructors

FlutterToast.new()
Factory constructor to return the singleton instance of FlutterToast.
factory

Properties

context BuildContext?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

init(BuildContext context) FlutterToast
Initializes the FlutterToast with the provided context.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showCustomToast(String message, {Color textColor = Colors.black, required GlobalKey<NavigatorState> navigatorKey, double fontSize = 16.0, String fontFamily = 'Roboto', Color backgroundColor = Colors.white, String? imagePath, Widget? child, bool showImage = true, int maxLines = 2, ToastGravity gravity = ToastGravity.bottom, double duration = 2.0}) → void
------------------------------------- Note -------------------------------------
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited