mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2026-03-18 15:45:56 +00:00
Layout created for single screen app (#2)
This commit is contained in:
18
lib/Utils/ViewUtils.dart
Normal file
18
lib/Utils/ViewUtils.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