Skip to content

Increase scroll amount / make it configurable #379

@davidmartos96

Description

@davidmartos96

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"),
            );
          },
        ),
      ),
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    embedderIssue concerns the embedder packageenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions