Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile listView not accepting empty list #37

Closed
mohammedX6 opened this issue Jun 3, 2021 · 0 comments
Closed

Mobile listView not accepting empty list #37

mohammedX6 opened this issue Jun 3, 2021 · 0 comments

Comments

@mohammedX6
Copy link

If I send an empty list to the listview this error appears:

The following assertion was thrown building RawGestureDetector-[LabeledGlobalKey#fc898](state: RawGestureDetectorState#5c95b(gestures: , behavior: opaque)):
A RenderViewport expected a child of type RenderSliver but received a child of type RenderPositionedBox.

RenderObjects expect specific types of children because they coordinate with their children during layout and paint. For example, a RenderSliver cannot be the child of a RenderBox because a RenderSliver does not understand the RenderBox layout protocol.
The RenderViewport that expected a RenderSliver child was created by: Viewport ← IgnorePointer-[GlobalKey#93c42] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#fc898] ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#8d585] ← RepaintBoundary ← CustomPaint ← RepaintBoundary ← ⋯
The RenderPositionedBox that did not match the expected child type was created by: Center ← Viewport ← IgnorePointer-[GlobalKey#93c42] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#fc898] ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#8d585] ← RepaintBoundary ← CustomPaint ← ⋯
The relevant error-causing widget was:
NativeDataTable file:///Users/apple/AndroidStudioProjects/Adaa_Mobile/lib/src/KPIReport/Widgets/ComplexOperations.dart:38:30
When the exception was thrown, this was the stack:
#0 ContainerRenderObjectMixin.debugValidateChild. (package:flutter/src/rendering/object.dart:3129:9)
#1 ContainerRenderObjectMixin.debugValidateChild (package:flutter/src/rendering/object.dart:3156:6)
#2 MultiChildRenderObjectElement.insertRenderObjectChild (package:flutter/src/widgets/framework.dart:6160:25)
#3 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:5758:35)
#4 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5440:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant