A Flutter widget that scrolls text infinitely. Provides many customizations including custom scroll directions and velocities, pausing after every round and specifying custom durations and curves for accelerating and decelerating.
MIT License
274
stars
113
forks
source link
null reference error when widget height is unconstrained #70
Hey. I have no idea why is this happening, but when I put Marquee directly in my widget tree instead of Text widget it gives a null reference with a long call stack:
═════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was
CustomScrollView
lib\pages\subtitle_details.dart:182
════════════════════════════════════════════════════════════════════════════════
E/flutter (31099): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter (31099): #0 ScrollPosition.minScrollExtent
package:flutter/…/widgets/scroll_position.dart:136
E/flutter (31099): #1 ScrollPosition._updateSemanticActions
package:flutter/…/widgets/scroll_position.dart:634
E/flutter (31099): #2 ScrollPosition.notifyListeners
package:flutter/…/widgets/scroll_position.dart:929
E/flutter (31099): #3 ScrollPosition.forcePixels
package:flutter/…/widgets/scroll_position.dart:377
E/flutter (31099): #4 ScrollPositionWithSingleContext.jumpTo
package:flutter/…/widgets/scroll_position_with_single_context.dart:198
E/flutter (31099): #5 ScrollController.jumpTo
package:flutter/…/widgets/scroll_controller.dart:173
...
E/flutter (31099): #8 SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1144
E/flutter (31099): #9 SchedulerBinding.handleDrawFrame
package:flutter/…/scheduler/binding.dart:1090
E/flutter (31099): #10 SchedulerBinding._handleDrawFrame
package:flutter/…/scheduler/binding.dart:998
E/flutter (31099): #11 _rootRun (dart:async/zone.dart:1354:13)
E/flutter (31099): #12 _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (31099): #13 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
═════ Exception caught by scheduler library ═════════════════════════════════
Null check operator used on a null value
════════════════════════════════════════════════════════════════════════════════
E/flutter (31099): #14 _invoke (dart:ui/hooks.dart:163:10)
E/flutter (31099): #15 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
E/flutter (31099): #16 _drawFrame (dart:ui/hooks.dart:126:31)
E/flutter (31099):
E/flutter (31099): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value
E/flutter (31099): #0 RenderViewportBase.hitTestChildren
package:flutter/…/rendering/viewport.dart:703
E/flutter (31099): #1 RenderBox.hitTest
package:flutter/…/rendering/box.dart:2414
E/flutter (31099): #2 RenderProxyBoxMixin.hitTestChildren
package:flutter/…/rendering/proxy_box.dart:131
....
E/flutter (31099): #84 GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:279
E/flutter (31099): #85 _rootRunUnary (dart:async/zone.dart:1370:13)
E/flutter (31099): #86 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (31099): #87 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (31099): #88 _invoke1 (dart:ui/hooks.dart:182:10)
E/flutter (31099): #89 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
E/flutter (31099): #90 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
But when I put my widget in a SizedBox with a fixed height, it works, but I need to know exact height of font to make it work in this way. scrolling axis is horizontal so it should not care about vertical bounds, so I guess it's a bug in marquee.
Hey. I have no idea why is this happening, but when I put Marquee directly in my widget tree instead of
Text
widget it gives a null reference with a long call stack:But when I put my widget in a SizedBox with a fixed height, it works, but I need to know exact height of font to make it work in this way. scrolling axis is horizontal so it should not care about vertical bounds, so I guess it's a bug in marquee.