Hello members am new bee to flutter i have dynamic movies list when i search movies list sometime i got 10 sometimes i got 2 values which correct but i want to have a button below this dynamic grid view which will be moving up and down with height of dynamic grid view here is what i wan t to achieve
i have tried with Stack
Stack(
children: [
Positioned(
top: 0,
bottom: 0,
left: 0,
right: 0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 3,
child: GridView.builder(
//shrinkWrap: true,
physics:NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 24, left: 15, right: 15),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 165 / 219,
mainAxisSpacing: 15,
crossAxisSpacing: 15,
),
itemBuilder: (context, index) {
return _buildMoviesItem(context, state, index);
},
itemCount: movies.length,
),
),
],
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Text('Clear search results')
),
],
);
but my button is always sticks t bottom never changed with dynamic grid view. thanks