Closed zileyuan closed 5 years ago
Launching lib/main.dart on M811 in debug mode... Built build/app/outputs/apk/debug/app-debug.apk. I/flutter (10707): ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter (10707): The following NoSuchMethodError was thrown during a scheduler callback: I/flutter (10707): The method 'findRenderObject' was called on null. I/flutter (10707): Receiver: null I/flutter (10707): Tried calling: findRenderObject() I/flutter (10707): When the exception was thrown, this was the stack: I/flutter (10707): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) I/flutter (10707): #1 _TransformerPageViewState._onGetSize package:transformer_page_view/transformer_page_view.dart:455 I/flutter (10707): #2 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback package:flutter/…/scheduler/binding.dart:988 I/flutter (10707): #3 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame package:flutter/…/scheduler/binding.dart:936 I/flutter (10707): #4 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame package:flutter/…/scheduler/binding.dart:840 I/flutter (10707): #8 _invoke (dart:ui/hooks.dart:209:10) I/flutter (10707): #9 _drawFrame (dart:ui/hooks.dart:168:3) I/flutter (10707): (elided 3 frames from package dart:async) I/flutter (10707): ════════════════════════════════════════════════════════════════════════════════════════════════════
in function void onGetSize() { RenderObject renderObject = context.findRenderObject(); Size size = renderObject?.paintBounds?.size; _calcCurrentPixels(); onGetSize(size); }
and context is null
怎样才能看到左右两边的图片?
Launching lib/main.dart on M811 in debug mode... Built build/app/outputs/apk/debug/app-debug.apk. I/flutter (10707): ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter (10707): The following NoSuchMethodError was thrown during a scheduler callback: I/flutter (10707): The method 'findRenderObject' was called on null. I/flutter (10707): Receiver: null I/flutter (10707): Tried calling: findRenderObject() I/flutter (10707): When the exception was thrown, this was the stack: I/flutter (10707): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) I/flutter (10707): #1 _TransformerPageViewState._onGetSize package:transformer_page_view/transformer_page_view.dart:455 I/flutter (10707): #2 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback package:flutter/…/scheduler/binding.dart:988 I/flutter (10707): #3 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame package:flutter/…/scheduler/binding.dart:936 I/flutter (10707): #4 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame package:flutter/…/scheduler/binding.dart:840 I/flutter (10707): #8 _invoke (dart:ui/hooks.dart:209:10) I/flutter (10707): #9 _drawFrame (dart:ui/hooks.dart:168:3) I/flutter (10707): (elided 3 frames from package dart:async) I/flutter (10707): ════════════════════════════════════════════════════════════════════════════════════════════════════