Flutter Rotate CupertinoPicker

732

How about the RotatedBox widget?

RotatedBox(
  quarterTurns: 1,
  child: CupertinoPicker(...),
)

Unlike Transform, which applies a transform just prior to painting, this object applies its rotation prior to layout, which means the entire rotated box consumes only as much space as required by the rotated child.

Share:
732
Quasi
Author by

Quasi

Updated on December 21, 2022

Comments

  • Quasi
    Quasi 2 minutes

    Is there any way to rotate the CupertinoPicker in Flutter by 90 degrees? So that you can pick horizontally and not vertically. Transform.rotate is not an option because then the width of the Picker is limited to the height of the parent widget. Or is there any good way to force the cupertino picker to be bigger than its parent widget?