Here I have below Widget in my bttomsheet (showModalBottomSheet) :
Flexible(
child: ListView.separated(
separatorBuilder: (context, index) => Container(
height: 20.h,
),
itemCount: 22,
itemBuilder: (context, index) {
return NagarTiming("test");
}),
),
This works file while I run the application i.e. I can see list of widgets properly. But then I have generated the .apk file using command in android studio,
and then I have installed that apk in my android device, The issue is : bottomsheet opens but it has blank content, there is no list of widget and it giving below error :
the following assertion was thrown while applying parent data.: Incorrect use of ParentDataWidget.
The ParentDataWidget Flexible(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type ParentData.
Usually, this means that the Flexible widget has the wrong ancestor RenderObjectWidget. Typically, Flexible widgets are placed directly inside Flex widgets. The offending Flexible is currently placed inside a SizedBox widget.
The ownership chain for the RenderObject that received the incompatible parent data was: _ScrollSemantics-[GlobalKey#f71a8] ← NotificationListener ← Scrollable ← PrimaryScrollController ← ListView ← Flexible ← SizedBox ← Column ← Padding ← Container ← ⋯ When the exception was thrown, this was the stack: #0 RenderObjectElement._updateParentData. (package:flutter/src/widgets/framework.dart:5960:11)
What might be the issue? Thanks.