MarcelGarus / MarcelGarus/marquee

Exception while building and running

Open
#35 2 comments 0 reactions 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

Everytime I try to build the project after adding this library, I get exception throw and the debug build stops
Exception thrown at

    await _makeRoundTrip();
    return _running && !isDone;
  }

A complete log is here:

I/flutter (19927): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (19927): The following assertion was thrown during performResize():
I/flutter (19927): Horizontal viewport was given unbounded width.
I/flutter (19927): Viewports expand in the scrolling direction to fill their container. In this case, a horizontal
I/flutter (19927): viewport was given an unlimited amount of horizontal space in which to expand. This situation
I/flutter (19927): typically happens when a scrollable widget is nested inside another scrollable widget.
I/flutter (19927): If this widget is always nested in a scrollable widget there is no need to use a viewport because
I/flutter (19927): there will always be enough horizontal space for the children. In this case, consider using a Row
I/flutter (19927): instead. Otherwise, consider using the "shrinkWrap" property (or a ShrinkWrappingViewport) to size
I/flutter (19927): the width of the viewport to the sum of the widths of its children.
I/flutter (19927):
I/flutter (19927): The relevant error-causing widget was:
I/flutter (19927):   ListView
I/flutter (19927):   
package:marquee/marquee.dart:691
I/flutter (19927):
I/flutter (19927): When the exception was thrown, this was the stack:

I/flutter (19927): (elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
I/flutter (19927):
I/flutter (19927): The following RenderObject was being processed when the exception was fired: RenderViewport#12a42 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:
I/flutter (19927):   needs compositing
I/flutter (19927):   creator: Viewport ← IgnorePointer-[GlobalKey#6e389] ← Semantics ← _PointerListener ← Listener ←
I/flutter (19927):     _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#ae98d] ←
I/flutter (19927):     _PointerListener ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#33636] ←
I/flutter (19927):     RepaintBoundary ← ⋯
I/flutter (19927):   parentData: <none> (can use size)
I/flutter (19927):   constraints: BoxConstraints(unconstrained)
I/flutter (19927):   size: MISSING
I/flutter (19927):   axisDirection: right
I/flutter (19927):   crossAxisDirection: down
I/flutter (19927):   offset: ScrollPositionWithSingleContext#55548(offset: 0.0, range: null..null, viewport: null,
I/flutter (19927):     ScrollableState, NeverScrollableScrollPhysics -> ClampingScrollPhysics, IdleScrollActivity#1ad9d,
I/flutter (19927):     ScrollDirection.idle)
I/flutter (19927):   anchor: 0.0
I/flutter (19927): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (19927):     center child: RenderSliverPadding#f57e1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (19927):       child: RenderSliverList#d5a5a NEEDS-LAYOUT NEEDS-PAINT
I/flutter (19927): ════════════════════════════════════════════════════════════════════════════════════════════════════

Also, I use the widget inside Row widget for which I have looked at other issue and added the necessary Expanded widget as a parent one.
Please help.

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 with the _scroll method and the ListView reported at package:marquee/marquee.dart:691, then reproduce the widget inside a Row with the stated Expanded wrapper in a Flutter debug build. Inspect the constraints reaching the horizontal viewport; done means the example no longer throws the unbounded-width assertion while scrolling.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.