══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following assertion was thrown while dispatching notifications for EnlargeWin:
setState() or markNeedsBuild() called during build.
This _InheritedProviderScope<EnlargeWin> widget cannot be marked as needing to build because the
framework is already in the process of building widgets. A widget can be marked as needing to be
built during the build phase only if one of its ancestors is currently building. This exception is
allowed because the framework builds parent widgets before children, which means a dirty descendant
will always be built. Otherwise, the framework might not visit this widget during this build phase.
The widget on which setState() or markNeedsBuild() was called was:
_InheritedProviderScope<EnlargeWin>
The widget which was currently being built when the offending call was made was:
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════ The following assertion was thrown while dispatching notifications for EnlargeWin: setState() or markNeedsBuild() called during build. This _InheritedProviderScope<EnlargeWin> widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase. The widget on which setState() or markNeedsBuild() was called was: _InheritedProviderScope<EnlargeWin> The widget which was currently being built when the offending call was made was: BodyComponent When the exception was thrown, this was the stack: #0 Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:4211:11) #1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4226:6) #2 _InheritedProviderScopeElement.markNeedsNotifyDependents (package:provider/src/inherited_provider.dart:452:5) #3 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:209:21) #4 EnlargeWin.setRealTime (package:kioskapp/providers/body/transfer/detail/VideoProv.dart:147:5) #5 _BodyComponentState.build (package:kioskapp/components/body/BodyComponent.dart:153:19) #6 StatefulElement.build (package:flutter/src/widgets/framework.dart:4663:28) #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4546:15) #8 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4719:11) #9 Element.rebuild (package:flutter/src/widgets/framework.dart:4262:5) #10 StatefulElement.update (package:flutter/src/widgets/framework.dart:4751:5) #11 Element.updateChild (package:flutter/src/widgets/framework.dart:3245:15) #12 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5566:32) #13 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6001:17) #14 Element.updateChild (package:flutter/src/widgets/framework.dart:3245:15) #15 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5881:14) #16 Element.updateChild (package:flutter/src/widgets/framework.dart:3245:15) #17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4571:16) #18 Element.rebuild (package:flutter/src/widgets/framework.dart:4262:5) #19 StatelessElement.update (package:flutter/src/widgets/framework.dart:4627:5) #20 Element.updateChild (package:flutter/src/widgets/framework.dart:3245:15) #21 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4571:16) #22 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4719:11) #23 Element.rebuild (package:flutter/src/widgets/framework.dart:4262:5) #24 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2667:33) #25 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:866:20) #26 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5) #27 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15) #28 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1056:9) #29 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:972:5) #33 _invoke (dart:ui/hooks.dart:253:10) #34 _drawFrame (dart:ui/hooks.dart:211:3) (elided 3 frames from dart:async) The EnlargeWin sending notification was: Instance of 'EnlargeWin' ════════════════════════════════════════════════════════════════════════════════════════════════════ Another exception was thrown: setState() or markNeedsBuild() called during build. Another exception was thrown: setState() or markNeedsBuild() called during build. ════════ Exception caught by foundation library ════════════════════════════════════════════════════ The following assertion was thrown while dispatching notifications for EnlargeWin: setState() or markNeedsBuild() called during build. This _InheritedProviderScope<EnlargeWin> widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase. The widget on which setState() or markNeedsBuild() was called was: _InheritedProviderScope<EnlargeWin> value: Instance of 'EnlargeWin' listening to value The widget which was currently being built when the offending call was made was: BodyComponent dirty dependencies: [_InheritedProviderScope<CurrentEpn>, _InheritedProviderScope<BodyLoading>, _InheritedProviderScope<MenuIndex>, _InheritedProviderScope<MqttController>] state: _BodyComponentState#fb914 When the exception was thrown, this was the stack: #0 Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:4211:11) #1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4226:6) #2 _InheritedProviderScopeElement.markNeedsNotifyDependents (package:provider/src/inherited_provider.dart:452:5) #3 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:209:21) #4 EnlargeWin.setRealTime (package:kioskapp/providers/body/transfer/detail/VideoProv.dart:147:5) ... The EnlargeWin sending notification was: Instance of 'EnlargeWin' ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by foundation library ════════════════════════════════════════════════════ setState() or markNeedsBuild() called during build. ════════════════════════════════════════════════════════════════════════════════════════════════════ ════════ Exception caught by foundation library ════════════════════════════════════════════════════ setState() or markNeedsBuild() called during build. ════════════════════════════════════════════════════════════════════════════════════════════════════
// Test provider
class Test with ChangeNotifiter {
init() {
this.a = false;
this.b = false;
this.c = false;
}
}
// Test provider 호출
class MyMainState extends State<MyMain> {
@override
Widget build(BuildContext context) {
Test _test = Provider.of<Test>(context);
// Test provider 초기화 함수 호출
_test.init();
return Container(
child: Text('Hello World'),
);
}
}
[Flutter] VlcPlayer가 Build시 앱 팅김현상 (0) | 2021.07.09 |
---|---|
Flutter로 image.network not load 에러 (0) | 2021.07.08 |
[Java] SSL 접속 시 에러 (No subject alternative names matching IP address 192.168.0.10 found) (3) | 2021.03.08 |
댓글 영역