Skip to content

Simulator ignores screen orientation #7846

@Sfshaza

Description

@Sfshaza

Steps to Reproduce

Run the Flutter gallery demo in the Simulator. Go to the Grid List page. Change orientation in the simulator using the Hardware > Rotate Left/Right. Nothing happens. Quit the demo, and change the orientation of the Simulator. Relaunch and navigate to the Grid List demo, sideways. It still doesn't reflect the sideways orientation, though grid_list_demo.dart takes orientation into account:

      body: new Column(
        children: <Widget>[
          new Expanded(
            child: new ScrollGrid.count(
              crossAxisCount: (orientation == Orientation.portrait) ? 2 : 3,
              mainAxisSpacing: 4.0,
              crossAxisSpacing: 4.0,
              padding: const EdgeInsets.all(4.0),
              childAspectRatio: (orientation == Orientation.portrait) ? 1.0 : 1.3,
              children: photos.map((Photo photo) {
                return new GridDemoPhotoItem(
                  photo: photo,
                  tileStyle: _tileStyle,
                  onBannerTap: (Photo photo) {
                    setState(() {
                      photo.isFavorite = !photo.isFavorite;
                    });
                  }
                );
              }).toList(),
            )
          )
        ]
      )

Flutter Doctor

Paste the output of running flutter doctor here.

$ flutter doctor
[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/shaza/GoogleDrive/TMP-flutter/flutter
    • Framework revision f56c5a3651 (50 minutes ago), 2017-02-02 17:02:29
    • Engine revision b8d144dab8
    • Tools Dart version 1.22.0-dev.10.3

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.0)
    • Android SDK at /Users/shaza/Library/Android/sdk
    • Platform android-25, build-tools 25.0.0
    • Java(TM) SE Runtime Environment (build 1.8.0_112-b16)

[✓] iOS toolchain - develop for iOS devices (Xcode 7.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 7.3.1, Build version 7D1014
    • ios-deploy 1.9.0

[✓] IntelliJ IDEA Community Edition (version 2016.3.1)
    • Dart plugin version 163.9166.22
    • Flutter plugin version 0.1.8

[✓] Connected devices
    • iPhone 6s • DFD0512F-17D2-4828-8CEA-A98DBDB5499E • ios • iOS 9.3 (simulator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions