Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios首次加载bug #383

Closed
dmskys opened this issue Oct 31, 2020 · 2 comments
Closed

ios首次加载bug #383

dmskys opened this issue Oct 31, 2020 · 2 comments

Comments

@dmskys
Copy link

dmskys commented Oct 31, 2020

════════ Exception caught by foundation library ════════════════════════════════════════════════════
The following assertion was thrown while dispatching notifications for ValueNotifier:
setState() or markNeedsBuild() called during build.

This EasyRefresh 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: EasyRefresh
state: _EasyRefreshState#1df6f
The widget which was currently being built when the offending call was made was: LayoutBuilder
renderObject: _RenderLayoutBuilder#fb71b relayoutBoundary=up2 NEEDS-PAINT
When the exception was thrown, this was the stack:
#0 Element.markNeedsBuild. (package:flutter/src/widgets/framework.dart:4292:11)
#1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4307:6)
#2 State.setState (package:flutter/src/widgets/framework.dart:1264:14)
#3 _EasyRefreshState.initState. (package:flutter_easyrefresh/src/refresher.dart:286:9)
#4 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:226:25)
...
The ValueNotifier sending notification was: ValueNotifier#ae821(Instance of 'TaskState')
════════════════════════════════════════════════════════════════════════════════════════════════════

@xuelongqy
Copy link
Owner

非常感谢,将在下个版本修复 issues#382

@xuelongqy
Copy link
Owner

v2.1.7已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants