rotate method
void
rotate()
Change the simulated device orientation between portrait and landscape.
Implementation
void rotate() {
final index = (data.orientation.index + 1) % Orientation.values.length;
data = data.copyWith(
orientation: Orientation.values[index],
);
}