Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

The _dismissingContext is null #40

Closed
khocef opened this issue Dec 29, 2019 · 0 comments · Fixed by #41
Closed

The _dismissingContext is null #40

khocef opened this issue Dec 29, 2019 · 0 comments · Fixed by #41

Comments

@khocef
Copy link

khocef commented Dec 29, 2019

Error

E/flutter (14884): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'focusScopeNode' was called on null.
E/flutter (14884): Receiver: null
E/flutter (14884): Tried calling: focusScopeNode

Future<bool> hide() {
    if (_isShowing) {
      try {
        _isShowing = false;
        Navigator.of(_dismissingContext).pop(true);
        if (_showLogs) debugPrint('ProgressDialog dismissed');
        return Future.value(true);
      } catch (_) {
        return Future.value(false);
      }
    } else {
      if (_showLogs) debugPrint('ProgressDialog already dismissed');
      return Future.value(false);
    }
  }

the _dismissingContext context is always null
the _dismissingContext should be initialized

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant