execute method

  1. @override
Future<void> execute(
  1. BuildContext context, {
  2. Map<String, dynamic>? arguments,
})
override

Implementation

@override
Future<void> execute(flutter.BuildContext context,
    {Map<String, dynamic>? arguments}) async {
  final value = (await condition?.execute(context)) ?? defaultCase;

  if (context.mounted) {
    final caseAction =
        cases?.firstWhereOrNull((element) => element.value == value);

    caseAction?.action?.execute(context);
  }
}