getLocalHeroScopeState method

LocalHeroScopeState getLocalHeroScopeState()

Implementation

LocalHeroScopeState getLocalHeroScopeState() {
  final inheritedState = getInheritedWidget<_InheritedLocalHeroScopeState>();
  assert(() {
    if (inheritedState == null) {
      throw FlutterError('No LocalHeroScope for a LocalHero\n'
          'When creating a LocalHero, you must ensure that there\n'
          'is a LocalHeroScope above the LocalHero.\n');
    }
    return true;
  }());

  return inheritedState!.state;
}