Flutter -- iOS -- Row

 1 import 'package:Flutter/material.dart';
 2 
 3 class LayoutDemo extends StatelessWidget{
 4   @override
 5   Widget build(BuildContext context) {
 6     // Todo: implement build
 7     return new Scaffold(
 8       appBar: new AppBar(
 9         title: new Text('水平布局示例'),
10       ),
11       body: new Row(
12         children: <Widget>[
13           new Expanded(child: new Text('左侧文本',textAlign: TextAlign.center)),
14           new Expanded(child: new Text('中间文本',textAlign: TextAlign.center)),
15           new Expanded(child: new FittedBox(fit: BoxFit.contain,child: const Flutterlogo()))
16         ],
17       ),
18     );
19   }
20 }
21 
22 void main(){
23   runApp(
24     new MaterialApp(
25       title: '水平对齐',
26       home: new LayoutDemo(),
27     ),
28   );
29 }

 

相关文章

这篇文章主要讲解了“FlutterComponent动画的显和隐怎么实现...
这篇文章主要讲解了“flutter微信聊天输入框功能如何实现”,...
本篇内容介绍了“Flutter之Navigator的高级用法有哪些”的有...
这篇文章主要介绍“Flutter怎么使用Android原生播放器”,在...
Flutter开发的android端如何修改APP名称,logo,版本号,具体...
Flutter路由管理初识路由概念一.路由管理1.1.Route1.2.Mater...