execute method

Future<ContentItem?> execute(
  1. BuildContext context
)

Implementation

Future<ContentItem?> execute(BuildContext context) async {
  final value = (await condition?.execute(context)) ?? defaultCase;

  final caseItem =
      cases?.firstWhereOrNull((element) => element.value == value);

  return caseItem?.item;
}