Skip to content

Does it not support the mobile phone to dynamically switch between horizontal and vertical screens? #19

Description

@lan2000

Hello, does it not support the mobile phone to dynamically switch between horizontal and vertical screens?
The item position is out of order after the phone is horizontally screened.

dependencies:
scroll_snap_list: ^0.8.2

[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.630], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] Connected device (4 available)
• No issues found!

MaterialApp(
      title: 'Horizontal List Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text("Horizontal List"),
        ),
        body: ScrollSnapList(
          onItemFocus: _onItemFocus,
          itemSize: MediaQuery.of(context).size.width,
          itemBuilder: (BuildContext context, int index) => Container(
            color: Colors.orangeAccent,
            child: Center(
              child: Text("$index"),
            ),
            height: 200,
            width: MediaQuery.of(context).size.width,
          ),
          itemCount: data.length,
        ),
      ),
    )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions