mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-19 22:06:31 +08:00
添加Row Expanded 填充
This commit is contained in:
@ -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),)
|
||||
),),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ class _DemoState extends State<Demo> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
RowLayoutCreate(),
|
||||
SizedBox(height: 10.0,),
|
||||
RowExpanded(),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
|
Reference in New Issue
Block a user