INNER CODE UNIT · Dart

of

woltapp/wolt_modal_sheet · lib/src/wolt_modal_sheet.dart:246

  static WoltModalSheetState of(BuildContext context) {
    // Handles the case where the input context is a navigator element.
    WoltModalSheetState? woltModalSheetState;
    if (context is StatefulElement && context.state is WoltModalSheetState) {
      woltModalSheetState = context.state as WoltModalSheetState;
    }
    woltModalSheetState ??=
        context.findAncestorStateOfType<WoltModalSheetState>();

    assert(() {
      if (woltModalSheetState == null) {
        throw FlutterError(
          'Operation requested with a context that does not include a WoltModalSheet.\n'
          'The context used to navigate with WoltModalSheetPage must be that of a widget that is a '
          'descendant of a WoltModalSheet widget.',
        );
      }
      return true;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…