showCustomToast static method
Implementation
static void showCustomToast(BuildContext context, String msg) {
AppConfig.printLog('showCustomToast: $msg');
try {
FToast fToast = FToast();
fToast.init(context);
fToast.showToast(
child: Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(30)),
decoration: BoxDecoration(
color: RechargeConstantColors.bg_pop_color,
borderRadius: BorderRadius.circular(20),
),
child: Text(
msg,
style: RechargeConstantText.text16WhiteBold,
textAlign: TextAlign.center,
),
),
gravity: ToastGravity.CENTER,
toastDuration: Duration(seconds: 2));
} catch (e) {
AppConfig.printLog(e);
}
}