TF-1665 Enable app grid on mobile

(cherry picked from commit c9f9a2c214316606c8d3f9d63cf38c326369b112)
This commit is contained in:
dab246
2023-04-11 14:21:42 +07:00
committed by Dat Vu
parent 3f5fa41c75
commit 3eb1e20b5b
21 changed files with 383 additions and 308 deletions
@@ -38,6 +38,9 @@ class TMailToast {
/// defines the padding widget of the toast
EdgeInsets? padding;
/// defines the align text of the toast
TextAlign? textAlign;
static showToast(
text,
BuildContext context, {
@@ -55,6 +58,7 @@ class TMailToast {
leading,
width,
padding,
textAlign
}) {
assert(text != null);
ToastView.dismiss();
@@ -70,6 +74,7 @@ class TMailToast {
leading,
width,
padding,
textAlign,
toastDuration: toastDuration,
);
}
@@ -96,6 +101,7 @@ class ToastView {
Widget? leading,
double? width,
EdgeInsets? padding,
TextAlign? textAlign,
{int? toastDuration}
) async {
overlayState = Overlay.of(context, rootOverlay: false);
@@ -130,7 +136,8 @@ class ToastView {
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.normal
)
),
textAlign: textAlign
)
: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -144,7 +151,8 @@ class ToastView {
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.normal
)
),
textAlign: textAlign
)
)),
if (trailing != null) trailing