gpt4 book ai didi

dart - Flutter - 屏幕不滚动

转载 作者:IT老高 更新时间:2023-10-28 12:31:25 25 4
gpt4 key购买 nike

我插入了 6 张卡片,但无法滚动屏幕。

根据下图,页脚出现红色条纹,屏幕不滚动。

能够滚动屏幕缺少什么?

ma​​in.dart

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "Myapp",
home: new HomePage(),
);
}
}

class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) => new Scaffold(
appBar: new AppBar(
backgroundColor: new Color(0xFF26C6DA),
),
body: new Column(
children: <Widget>[
new Card(
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: const Icon(Icons.album),
title: const Text('The Enchanted Nightingale'),
subtitle: const Text('Music by Julie Gable. Lyrics by Sidney Stein.'),
),
],
),
),
...
...
...
],
)
);
}

enter image description here

最佳答案

列不滚动。尝试用 ListView 替换您的外部 Column。你可能需要把 shr​​inkWrap: true 放在上面。

关于dart - Flutter - 屏幕不滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44555629/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com