marquee icon indicating copy to clipboard operation
marquee copied to clipboard

No element bad state error

Open BasitCh opened this issue 4 years ago • 4 comments
trafficstars

════════ 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) ...

BasitCh avatar Jan 05 '21 10:01 BasitCh

@marcelgarus kindly see this now i need it on urgent basis.

BasitCh avatar Jan 05 '21 10:01 BasitCh

Do you pass in any text to the widget? As in, is your text ""? Seems like the Marquee doesn't handle that properly yet.

MarcelGarus avatar Jan 07 '21 11:01 MarcelGarus

You can use " " instead of "".

Virgil-N avatar Nov 05 '21 03:11 Virgil-N