Advertisement
Hevernooo

utils

Nov 20th, 2024
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.75 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:fluttertoast/fluttertoast.dart';
  3.  
  4. class utilsDone {
  5.   void toastMessage(String message){
  6.     Fluttertoast.showToast(
  7.         msg: message,
  8.         toastLength: Toast.LENGTH_SHORT,
  9.         gravity: ToastGravity.BOTTOM,
  10.         timeInSecForIosWeb: 1,
  11.         backgroundColor: Colors.lightGreen,
  12.         textColor: Colors.white,
  13.         fontSize: 16.0
  14.     );
  15.   }
  16. }
  17.  
  18. class utilsError {
  19.   void toastMessage(String message){
  20.     Fluttertoast.showToast(
  21.         msg: message,
  22.         toastLength: Toast.LENGTH_SHORT,
  23.         gravity: ToastGravity.BOTTOM,
  24.         timeInSecForIosWeb: 1,
  25.         backgroundColor: Colors.red,
  26.         textColor: Colors.white,
  27.         fontSize: 16.0
  28.     );
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement