为什么Flutter网站中缺少滚动条 [英] Why the scroll bar is missing in Flutter web

查看:121
本文介绍了为什么Flutter网站中缺少滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网页项目扑朔迷离,但是有问题.

I have a web page project in flutter but there is a problem.

当我使用VScode编写页面并在Google上本地运行时,滚动条不会向下滚动页面.

When I write the page with VScode and run it locally on Google, the scroll bar does not come to scroll down the page.

构建颤动的Web项目时,页面上最右边的滚动条不会出现.

The rightmost scroll bar on the pages does not appear when flutter web projects are built.

这是什么原因?

这是Google开发人员设计的方式吗?

Is this how Google developers designed it?

它与本机开发环境有关吗?

Could it have something to do with the native development environment?

推荐答案

您需要使用 Scrollbar 小部件包装 body ,并不要忘记将 isAlwaysShown 属性设置为 true .

You need to wrap your body with the Scrollbar widget, and do not forget to set isAlwaysShown attribute to true.

body: Scrollbar(
         isAlwaysShown: true,

这篇关于为什么Flutter网站中缺少滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆