TF-1042:remove widget unnecessary

This commit is contained in:
ManhNTX
2022-10-18 15:43:44 +07:00
committed by Dat H. Pham
parent df7f9b89ba
commit 5d234ff9b6
3 changed files with 16 additions and 16 deletions
@@ -109,15 +109,18 @@ class ToastView {
),
);
final Widget toastChild = ToastCard(
child,
Duration(seconds: toastDuration ?? 2),
fadeDuration: 500,
);
_overlayEntry = OverlayEntry(
builder: (BuildContext context) =>
_showWidgetBasedOnPosition(toastDuration != null ? toastChild : child, toastPosition));
_showWidgetBasedOnPosition(
toastDuration != null ?
ToastCard(
child,
Duration(seconds: toastDuration),
fadeDuration: 500,
)
: child, toastPosition,
));
_isVisible = true;
overlayState!.insert(_overlayEntry!);