Closed MitsuraIvan closed 1 year ago
Could you have a try by updating the dependency?
lifecycle:
git:
url: https://github.com/chenenyu/lifecycle.git
ref: f10a0b02bc32e6ee97e5cc09cf1960090724aec8
Waiting for your feedback~ 😄
Works like a charm, thank you very much, when this will be merged into main?
0.6.0
has been released.
lifecycle: 0.4.4
Launch-> crash
removing this
fixes the crash.
======== Exception caught by widgets library ======================================================= The following _Exception was thrown building Builder: Exception: Can not get associated LifecycleObserver, did you forget to register it in MaterialApp or Navigator?
0 new LifecycleObserver.internalGet (package:lifecycle/src/lifecycle_observer.dart:34:5)
1 LifecycleMixin.didChangeDependencies (package:lifecycle/src/lifecycle_mixin.dart:40:46)
2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4914:11)
3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4729:5)
... Normal element mounting (171 frames)
174 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3790:14)
175 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6422:36)
176 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6433:32)
... Normal element mounting (60 frames)
236 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3790:14)
237 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6422:36)
238 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6433:32)
... Normal element mounting (177 frames)
415 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3790:14)
416 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6422:36)
417 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6433:32)
... Normal element mounting (362 frames)
779 _InheritedProviderScopeElement.mount (package:provider/src/inherited_provider.dart:411:11)
... Normal element mounting (7 frames)
786 SingleChildWidgetElementMixin.mount (package:nested/nested.dart:222:11)
... Normal element mounting (7 frames)
793 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3790:14)
794 Element.updateChild (package:flutter/src/widgets/framework.dart:3540:18)
795 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
796 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
797 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1112:18)
798 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2600:19)
799 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
800 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)