mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2025-12-10 03:05:34 +00:00
Project lint checked and step added to config.yml
This commit is contained in:
18
lib/Utils/view_utils.dart
Normal file
18
lib/Utils/view_utils.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:toast/toast.dart';
|
||||
|
||||
class ViewUtils{
|
||||
|
||||
static displayToast(BuildContext context, String message){
|
||||
Toast.show(
|
||||
message,
|
||||
duration: Toast.lengthLong,
|
||||
gravity: Toast.bottom
|
||||
);
|
||||
}
|
||||
|
||||
static displayToastDeferred(BuildContext context, String message){
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => displayToast(context, message));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user