Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lan2000 opened this issue Aug 23, 2021 · 0 comments

Comments

@lan2000
Copy link

lan2000 commented Aug 23, 2021

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,
        ),
      ),
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant