[英]flutter scrolling does not work: ListView and SingleChildScrollView
[英]ListView not scrolling in SingleChildScrollView Flutter
遇到問題,添加SingleChildScrollView
時ListView.builder
不滾動。 可能是什么問題以及如何解決? 我們需要使 ListView 可滾動。
身體
Widget _child(context, Size size) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: SingleChildScrollView(
physics: const NeverScrollableScrollPhysics(),
child: Column(
children: [
const SizedBox(height: 121),
const BackStepWidget(text: 'My Poynts'),
const SizedBox(height: 25),
PoyntsList(size: size),
],
),
),
);
點列表
Widget build(BuildContext context) => MediaQuery.removePadding(
context: context,
removeTop: true,
child: ListView.builder(
shrinkWrap: true,
itemCount: list.length + 1,
itemBuilder: (context, index)...
請刪除 singlechildscrollview 並簡單地用 expanded 包裹你的 PoyntsList。 它會起作用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.