Reputation: 166
I got a Cupertino Switch in my Flutter app. I wanted to use this Switch Widget vertically.
When I use "Transform.rotate()" It rotates but when it comes to work; It logically stayes the same layout, horizontally.
So rotation just works visually. Is there any way to change the logical orientation of any flutter object?
child: Transform.rotate(
angle: -3.14 / 2, // -90 degree, vertical
child: new CupertinoSwitch(
value: activity,
onChanged: (bool value) {
setState(() {
...
});
},
),
),
Upvotes: 1
Views: 1038