-
-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Description
Here is my code, and it's working properly. ProfileReelsSection() is implemented as a SliverGrid in this
SliverStickyHeader.builder(
builder: (context, state) => Container(
height: 50.0,
color: cBgColor(context),
child: Column(
children: [
Container(
height: 1,
color: cGreyLight1(context),
),
Spacer(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 40),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_icon(imageName: MyImages.reelsCircles),
_icon(imageName: MyImages.market),
],
),
),
Spacer(),
],
),
),
sticky: true,
sliver: ProfileReelsSection(),
);
When I use ProfileReelsSection() implemented as a GridView.builder(), it is not working and I receive the error: 'Null check operator used on a null value'.
SliverToBoxAdapter(
child: Expanded(
child: PageView(
children: [
ProfileReelsSection(),
ProfileReelsSection(),
],
),
),
),
If I use SizedBox with a fixed height, it works without any error, but the size is fixed.
SliverToBoxAdapter(
child: SizedBox(
height: 300, // Set a fixed height for the PageView
child: PageView(
children: [
ProfileReelsSection(),
ProfileReelsSection(),
],
),
),
)
Please help
Metadata
Metadata
Assignees
Labels
No labels