Skip to content

Increase scroll amount / make it configurable #379

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

Closed
davidmartos96 opened this issue Mar 29, 2020 · 0 comments · Fixed by #380
Closed

Increase scroll amount / make it configurable #379

davidmartos96 opened this issue Mar 29, 2020 · 0 comments · Fixed by #380
Labels
embedder Issue concerns the embedder package enhancement New feature or request

Comments

@davidmartos96
Copy link
Contributor

I don't know if I am the only one, but I find the amount of scroll in go flutter too low in comparison to any other desktop / web application. I found in the source code that currently go-flutter is using 50 as the amount to scroll.

func (m *windowManager) glfwScrollCallback(window *glfw.Window, xoff float64, yoff float64) {

I compared how much a simple ListView using Flutter web is scrolling and it looks that is a flat 100.
I think it would be great if that amount could be increased or better yet, make it configurable with a constant. At the moment, at least for me, scrolling in a go-flutter app doesn't feel great.

This is the small code I tried to compare Flutter web and go-flutter.

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Page(),
    );
  }
}

class Page extends StatelessWidget {
  const Page({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Scrollbar(
        child: ListView.builder(
          itemCount: 50,
          shrinkWrap: true,
          itemBuilder: (context, i) {
            return Container(
              alignment: Alignment.centerLeft,
              height: 100,
              color: i % 2 == 0 ? Colors.blue : null,
              child: Text("Item $i"),
            );
          },
        ),
      ),
    );
  }
}
@davidmartos96 davidmartos96 added the enhancement New feature or request label Mar 29, 2020
@pchampio pchampio linked a pull request Mar 31, 2020 that will close this issue
@pchampio pchampio added the embedder Issue concerns the embedder package label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedder Issue concerns the embedder package enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants