I have a row with a gridview and a rotatedbox in it. I want to change the size of the gridview, but when I change it, the rotated box moves down.
Row(
children: [
Align(
alignment: Alignment.bottomLeft,
child: Container(
height: screenHeight / 1.583,
width: 50,
decoration: BoxDecoration(
color: ColorConstants.barColor,
borderRadius: BorderRadius.only(
topRight: Radius.circular(40),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
"Flat White",
style: TextStyle(
color: ColorConstants.mutedColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
"Espresso",
style: TextStyle(
color: ColorConstants.mutedColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
"Americano",
style: TextStyle(
color: ColorConstants.mutedColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
"Latte",
style: TextStyle(
color: ColorConstants.mutedColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
"Cappuccino",
style: TextStyle(
color: ColorConstants.textColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
],
),
),
),
),
Expanded(
child: GridView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: coffeeName.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
childAspectRatio: 100 / 100,
crossAxisCount: 2,
),
itemBuilder: (context, index) {
return CoffeeList(
coffeeName: coffeeName[index],
imageUrl: imageUrl[index],
price: price[index],
);
},
),
)
],
),
I want to resize the gridview but I don't want the rotatedbox to move.
when: childAspectRatio: 100 / 100, (Default):childAspectRatio: 100 / 100,
childAspectRatio: 100 / 200,[100 / 200] (https://i.stack.imgur.com/keqeG.png)