execute method
Future<FutureOr<void> >
execute(
- BuildContext context, {
- Map<
String, dynamic> ? arguments,
override
Implementation
@override
Future<FutureOr<void>> execute(BuildContext context,
{Map<String, dynamic>? arguments}) async {
if (isAwaited == true) {
ScaffoldMessenger.maybeOf(context)?.showSnackBar(SnackBar(
content:
Text(message.isEmpty ? 'Waiting for $milliseconds ms' : message),
duration: Duration(milliseconds: milliseconds),
));
await Future.delayed(Duration(milliseconds: milliseconds));
if (context.mounted) {
ScaffoldMessenger.maybeOf(context)?.hideCurrentSnackBar();
}
} else {
Future.delayed(Duration(milliseconds: milliseconds));
}
}