Flutter 如何使内容弯曲结束,零底部摆动
我想让文本小部件成为Flutter上的Flex-End 这是我的代码:Flutter 如何使内容弯曲结束,零底部摆动,flutter,Flutter,我想让文本小部件成为Flutter上的Flex-End 这是我的代码: return MaterialApp( title: 'Nature', home: Scaffold( appBar: AppBar( title: Text('John Doe'), ), body: Center( child: Text('Copyright © 2020'), ),
return MaterialApp(
title: 'Nature',
home: Scaffold(
appBar: AppBar(
title: Text('John Doe'),
),
body: Center(
child: Text('Copyright © 2020'),
),
),
我希望我的小部件文本在底部
Text()
return MaterialApp(
标题:"自然",,
家:脚手架(
appBar:appBar(
标题:文本(“John Doe”),
),
主体:对齐(
对齐:对齐.bottomCenter,
儿童:文本(“版权所有©2020”),
),
),
);
Text()
位于底部,数据显示在屏幕上return MaterialApp(
标题:"自然",,
家:脚手架(
appBar:appBar(
标题:文本(“John Doe”),
),
正文:ListView(
收缩膜:对,
儿童:[
容器(
高度:MediaQuery.of(context).size.height-50,
//您的屏幕数据在这里
),
容器(
身高:50,
儿童:中心(儿童:文本(“版权所有©2020”),
),
],
),
),
);
我认为scaffold小部件的底片是在屏幕底部编写任何内容的最佳方式
Scaffold(
bottomSheet: Container(
child: Text("Copyright © 2020"),
),
body: Container(
....
请试试这个
return MaterialApp(
title: 'Nature',
home: Scaffold(
appBar: AppBar(
title: Text('John Doe'),
),
body: Stack(
children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Copyright © 2020'),
)),
],
),
),
);
return MaterialApp(
标题:"自然",,
家:脚手架(
appBar:appBar(
标题:文本(“John Doe”),
),
主体:堆栈(
儿童:[
对齐(
对齐:对齐.bottomCenter,
孩子:填充(
填充:常数边集全部(8.0),
儿童:文本(“版权所有©2020”),
)),
],
),
),
);