Flutter-如何在列表视图内将小部件居中

Flutter-如何在列表视图内将小部件居中,第1张

Flutter-如何在列表视图内将小部件居中

垂直居中和水平居中:

Scaffold(  appBar: new AppBar(),  body: Center(    child: new ListView(      shrinkWrap: true,        padding: const EdgeInsets.all(20.0),        children: [          Center(child: new Text('ABC'))        ]    ),  ),);

垂直中心

Scaffold(  appBar: new AppBar(),  body: Center(    child: new ListView(      shrinkWrap: true,        padding: const EdgeInsets.all(20.0),        children: [          new Text('ABC')        ]    ),  ),);


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/4960731.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-13
下一篇2022-11-13

发表评论

登录后才能评论

评论列表(0条)

    保存