TF-1472: Fixed popup when sending email should be displayed at the bottom of screen

This commit is contained in:
HuyNguyen
2023-02-28 10:28:50 +07:00
committed by Dat Vu
parent 42a1cfab0b
commit 0913a73286
3 changed files with 15 additions and 8 deletions
+5 -1
View File
@@ -148,7 +148,8 @@ class AppToast {
void showToastWithIcon(BuildContext context, {
String? message, String? icon, Color? bgColor, Color? iconColor,
Color? textColor, double? radius, EdgeInsets? padding,
TextStyle? textStyle, double? widthToast, Duration? toastLength}) {
TextStyle? textStyle, double? widthToast, Duration? toastLength,
Duration? delayTime}) async {
double sizeWidth = context.width > 360 ? 360 : context.width - 40;
final toast = Material(
color: bgColor ?? Colors.white,
@@ -181,6 +182,9 @@ class AppToast {
),
);
fToast.init(context);
if (delayTime != null) {
await Future.delayed(delayTime);
}
fToast.showToast(
child: toast,
gravity: ToastGravity.BOTTOM,