添加Row Expanded 填充

This commit is contained in:
DeckeDeng
2019-04-17 20:50:26 +08:00
parent 1022e0dd3e
commit 0ca1cc9ca6
2 changed files with 35 additions and 1 deletions

View File

@ -1,4 +1,5 @@
/// Author: xiaojia.dxj
import 'package:flutter/material.dart';
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
@ -92,3 +93,34 @@ class RowLayoutCreate extends StatelessWidget {
);
}
}
class RowExpanded extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
////填充数据
Expanded(child: new RaisedButton(
onPressed: (){
},
color: Color(0xfffce4ec),
child:new Text('flutter',style: TextStyle(color: Colors.white),)
),),
Expanded(child: new RaisedButton(
onPressed: (){
},
color: Color(0xfff8bbd0),
child:new Text('Expanded',style: TextStyle(color: Colors.white),)
),),
Expanded(child: new RaisedButton(
onPressed: (){
},
color: Color(0xfff48fb1),
child:new Text('flutter',style: TextStyle(color: Colors.white),)
),),
],
);
}
}

View File

@ -60,6 +60,8 @@ class _DemoState extends State<Demo> {
return Column(
children: <Widget>[
RowLayoutCreate(),
SizedBox(height: 10.0,),
RowExpanded(),
Row(
children: <Widget>[
Expanded(