mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-20 06:16:20 +08:00
添加Row Expanded 填充
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
/// Author: xiaojia.dxj
|
/// Author: xiaojia.dxj
|
||||||
/// Date: 2018/11/22
|
/// Date: 2018/11/22
|
||||||
/// Email: xiaojia.dxj@alibaba-inc.com
|
/// Email: xiaojia.dxj@alibaba-inc.com
|
||||||
@ -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(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RowLayoutCreate(),
|
RowLayoutCreate(),
|
||||||
|
SizedBox(height: 10.0,),
|
||||||
|
RowExpanded(),
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
Reference in New Issue
Block a user