marquee
marquee copied to clipboard
No element bad state error
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ The following StateError was thrown building MarqueeText(dirty, dependencies: [Directionality, DefaultTextStyle, _LocalizationsScope-[GlobalKey#bca50], MediaQuery], state: _MarqueeTextState#f368a): Bad state: No element
The relevant error-causing widget was: MarqueeText file:///Users/abdulbasit/Desktop/Flutter%20Projects/Labaiik/libraries/widgets/lib/main_app_bar.dart:87:44 When the exception was thrown, this was the stack: #0 List.last (dart:core-patch/growable_array.dart:255:5) #1 _MarqueeTextState._getTextWidth (package:widgets/marquee_text.dart:684:18) #2 _MarqueeTextState._initialize (package:widgets/marquee_text.dart:580:25) #3 _MarqueeTextState.build (package:widgets/marquee_text.dart:689:5) #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28) ...
@marcelgarus kindly see this now i need it on urgent basis.
Do you pass in any text to the widget? As in, is your text ""?
Seems like the Marquee doesn't handle that properly yet.
You can use " " instead of "".