loading static method
GlobalKey<FlushbarState<Object?> >
loading({
- required BuildContext context,
- required String title,
- required Widget icon,
- String? description,
- Function? onUndo,
Implementation
static GlobalKey<FlushbarState> loading({
required BuildContext context,
required String title,
required Widget icon,
String? description,
Function? onUndo,
}) {
GlobalKey<FlushbarState> key = GlobalKey();
Flushbar flushbar = baseToast(
key: key,
title: TodayText(
title,
style: TodayTextStyle.tdsFontRegularPlus,
color: TodayTextColor.fullWhite,
),
description: description != null
? TodayText(
description,
style: TodayTextStyle.tdsFontSmall,
color: TodayTextColor.fullWhite,
)
: null,
icon: icon,
onUndo: onUndo,
backgroundColor: const Color.fromRGBO(23, 23, 23, 1),
duration: 10000,
isDismissible: false,
);
flushbar.show(context);
return key;
}