Tried to change the background color and text color in Flutter toast. But its not working properly
1,040
Fluttertoast.showToast(
msg: "This is Center Short Toast",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: 1,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 16.0
);
If this didn't work run flutter clean and restart the app
Comments
-
Jahidul Islam over 1 year
While trying to change the background color and text color of toast message in flutter, the changes are not reflecting.
Help me with the solution.
Fluttertoast.showToast( msg: text, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.CENTER, timeInSecForIosWeb: 1, backgroundColor: Colors.red, textColor: Colors.white, fontSize: 16.0 );
-
Yeasin Sheikh over 2 yearsCan you try with
flutter clean
and restart the app.
-