Tried calling: dependOnInheritedWidgetOfExactType<_EffectiveTickerMode>()
erpankaj opened this issue · 0 comments
======== Exception caught by widgets library =======================================================
The following NoSuchMethodError was thrown building Builder:
The method 'dependOnInheritedWidgetOfExactType' was called on null.
Receiver: null
Tried calling: dependOnInheritedWidgetOfExactType<_EffectiveTickerMode>()
The relevant error-causing widget was:
MaterialApp file:///D:/MyProjects/Chromatic%20App/chromatic-app/lib/main.dart:52:12
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 TickerMode.of (package:flutter/src/widgets/ticker_provider.dart:61:50)
#2 SingleTickerProviderStateMixin.didChangeDependencies (package:flutter/src/widgets/ticker_provider.dart:163:36)
#3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4724:11)
#4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4540:5)
E/flutter (22371): [ERROR:flutter/shell/common/shell.cc(103)] Dart Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe.
E/flutter (22371): At this point the state of the widget's element tree is no longer stable.
E/flutter (22371): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method., stack trace: #0 Element._debugCheckStateIsActiveForAncestorLookup. (package:flutter/src/widgets/framework.dart:3935:9)