FutureOr<bool> ensureLoaded() { var loaded = load(); if (loaded is Future<bool>) { return loaded.then(_checkLoaded); } return _checkLoaded(loaded); }