MarcelGarus / MarcelGarus/marquee

No element bad state error

Open
#49 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
363
Forks
147
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported exception from the MarqueeText widget at libraries/widgets/lib/main_app_bar.dart:87. Read package:widgets/marquee_text.dart around _MarqueeTextState._getTextWidth (line 684) and _initialize (line 580); done means the widget no longer throws StateError: No element in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.