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

emptyWidget赋值后,在onRefresh:null 时报错 #140

Closed
dahuahe opened this issue Aug 16, 2019 · 3 comments
Closed

emptyWidget赋值后,在onRefresh:null 时报错 #140

dahuahe opened this issue Aug 16, 2019 · 3 comments

Comments

@dahuahe
Copy link

dahuahe commented Aug 16, 2019

因为是聊天,所以onRefresh 就不写了 但是会出现报错
flutter: ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during a scheduler callback:
flutter: 'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1458 pos 12: 'center.parent ==
flutter: this': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 RenderViewport.indexOfFirstChild (package:flutter/src/rendering/viewport.dart:1458:12)
flutter: #3 RenderViewportBase.debugDescribeChildren (package:flutter/src/rendering/viewport.dart:772:17)
flutter: #4 DiagnosticableTreeNode.getChildren (package:flutter/src/foundation/diagnostics.dart:2843:20)
flutter: #5 TextTreeRenderer.render (package:flutter/src/foundation/diagnostics.dart:1168:43)
flutter: #6 TextTreeRenderer.render (package:flutter/src/foundation/diagnostics.dart:1295:39)
flutter: #7 FlutterError.dumpErrorToConsole (package:flutter/src/foundation/assertions.dart:623:11)
flutter: #8 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:712:14)
flutter: #9 RenderObject._debugReportException (package:flutter/src/rendering/object.dart:1185:18)
flutter: #10 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1499:7)
flutter: #11 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:765:18)
flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:346:19)
flutter: #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:701:13)
flutter: #14 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:285:5)
flutter: #15 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1016:15)
flutter: #16 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:958:9)
flutter: #17 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:874:5)
flutter: #21 _invoke (dart:ui/hooks.dart:236:10)
flutter: #22 _drawFrame (dart:ui/hooks.dart:194:3)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1694 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1694 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1694 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: Updated layout information required for RenderViewport#3abbb NEEDS-LAYOUT NEEDS-PAINT to calculate semantics.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1694 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 1796 pos 12: '!_needsPaint': is not true.

@dahuahe dahuahe changed the title emptyWidget onRefresh:null 报错 emptyWidget赋值后,在onRefresh:null 时报错 Aug 16, 2019
@dahuahe
Copy link
Author

dahuahe commented Aug 16, 2019

或者聊天的时候空视图 下拉刷新为什么没有起作用呢

@xuelongqy
Copy link
Owner

下个版本将会修复。你也可以使用git的方式导入github最新的源码进行测试

@xuelongqy
Copy link
Owner

v2.0.3已修复

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