showToast method
void
showToast({})
inherited
Implementation
void showToast({
required bool isLightTheme,
required String text,
bool isError = false,
}) {
try {
FToast().showToast(
gravity: ToastGravity.BOTTOM,
toastDuration: const Duration(seconds: 4), // Check
child: Container(
padding:
const EdgeInsets.only(left: 12, top: 12, right: 16, bottom: 12),
decoration: BoxDecoration(
color: isLightTheme
? SBUColors.background600
: SBUColors.background300,
borderRadius: const BorderRadius.all(Radius.circular(24)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SBUIconComponent(
iconSize: 24,
iconData: isError ? SBUIcons.error : SBUIcons.done,
iconColor: isLightTheme
? (isError
? SBUColors.errorLight
: SBUColors.secondaryLight)
: (isError ? SBUColors.errorMain : SBUColors.secondaryMain),
),
const SizedBox(width: 8),
SBUTextComponent(
text: text,
textType: SBUTextType.body3,
textColorType: SBUTextColorType.toast,
),
],
),
),
);
} catch (_) {}
}