0

I am new to flutter and using it for web. I see that there is no built in scrollbar when the page overflows the viewport

Would it be possible to somehow have a javascript script in the html that would check the height of the content periodically and add/remove scroll bar as necessary?

Does this make any sense?

Thank you

2
  • Do you mean Listview? Commented Oct 14, 2020 at 19:32
  • @P4yam for what I see ListView only allows scrolling with your mouse wheel, but there is no scrollbar in browser. Am I wrong? I am trying to see if it is possible to have the browser scrollbar somehow... IDK Commented Oct 14, 2020 at 19:41

1 Answer 1

1

I'm not sure if its what you want but if you wrap your Listview with Scrollbar then you get the result you want:

Scrollbar(
    child: ListView.builder(
      itemCount: 20,
      itemBuilder: (context, index) => ListTile(title: Text("Item= ${index + 1}"),),),
)

You can find more here

Sign up to request clarification or add additional context in comments.

3 Comments

Yes. It's good, I had read there was no scrollbar support. I would rather have the native browser scroll, this will do fine
Hi @P4yam, the problem is this scrollbar is not draggable. I mean it is but works funkyly, not usable to drag
@user3808307 unfortunately i dont know much about flutter web. it may be better to ask your question in flutter github

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.