Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

toast message in flutter

# add this line to your dependencies
# put the current version
fluttertoast: ^8.0.9 

# import file
import 'package:fluttertoast/fluttertoast.dart';

# Usage
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
);
Source by pub.dev #
 
PREVIOUS NEXT
Tagged: #toast #message #flutter
ADD COMMENT
Topic
Name
5+6 =