show static method
Implementation
static void show(String? msg, {IconData? iconData}) {
if (msg != null) {
if (msg.length <= 6) {
BotToast.showCustomText(
toastBuilder: (_) => SizedBox(
width: 120,
height: 120,
child: Card(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8))),
margin: EdgeInsets.zero,
color: Colors.black87,
child: SizedBox(
width: 120,
height: 120,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
iconData ?? CupertinoIcons.info,
color: Colors.white,
size: 40,
),
const SizedBox(
height: 12,
),
Text(
msg,
style: const TextStyle(color: Colors.white),
)
],
),
),
),
),
align: Alignment.center,
wrapToastAnimation: null,
onlyOne: true,
);
} else {
BotToast.showText(
text: msg,
align: Alignment.center,
wrapToastAnimation: null,
contentColor: Colors.black87,
);
}
}
}