mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-08-06 09:01:00 +08:00
fix:view code
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_go/components/widget_demo.dart';
|
||||
import 'demo.dart';
|
||||
// import 'package:flutter_go/widgets/elements/Form/Text/RichText/demo.dart';
|
||||
import './demo.dart';
|
||||
|
||||
const String intro = """
|
||||
### **简介**
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
* @Author: 一凨
|
||||
* @Date: 2018-11-28 20:09:40
|
||||
* @Last Modified by: 一凨
|
||||
* @Last Modified time: 2018-11-28 20:10:32
|
||||
*/
|
||||
/// @Author: 一凨
|
||||
/// @Date: 2018-11-28 20:09:40
|
||||
/// @Last Modified by: 一凨
|
||||
/// @Last Modified time: 2018-11-28 20:10:32
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ExpandedDemo extends StatelessWidget {
|
||||
@ -14,57 +13,57 @@ class ExpandedDemo extends StatelessWidget {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Text('Expanded'),
|
||||
new Row(children: <Widget>[
|
||||
new RaisedButton(
|
||||
Row(children: <Widget>[
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击红色按钮事件');
|
||||
},
|
||||
color: const Color(0xffcc0000),
|
||||
child: new Text('红色按钮',style: txtColor,),
|
||||
child: Text('红色按钮',style: txtColor,),
|
||||
),
|
||||
new Expanded(
|
||||
Expanded(
|
||||
flex: 1,//flex用来设置当前可用空间的占优比
|
||||
child: new RaisedButton(
|
||||
child: RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击黄色按钮事件');
|
||||
},
|
||||
color: const Color(0xfff1c232),
|
||||
child: new Text('黄色按钮',style: txtColor,),
|
||||
child: Text('黄色按钮',style: txtColor,),
|
||||
),
|
||||
),
|
||||
new RaisedButton(
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击粉色按钮事件');
|
||||
},
|
||||
color: const Color(0xffea9999),
|
||||
child: new Text('粉色按钮',style: txtColor,),
|
||||
child: Text('粉色按钮',style: txtColor,),
|
||||
),
|
||||
]),
|
||||
Text('Flexible'),
|
||||
new Row(children: <Widget>[
|
||||
new RaisedButton(
|
||||
Row(children: <Widget>[
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击红色按钮事件');
|
||||
},
|
||||
color: const Color(0xffcc0000),
|
||||
child: new Text('红色按钮',style: txtColor,),
|
||||
child: Text('红色按钮',style: txtColor,),
|
||||
),
|
||||
new Flexible(
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: new RaisedButton(
|
||||
child: RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击黄色按钮事件');
|
||||
},
|
||||
color: const Color(0xfff1c232),
|
||||
child: new Text('黄色按钮',style: txtColor,),
|
||||
child: Text('黄色按钮',style: txtColor,),
|
||||
),
|
||||
),
|
||||
new RaisedButton(
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
print('点击粉色按钮事件');
|
||||
},
|
||||
color: const Color(0xffea9999),
|
||||
child: new Text('粉色按钮',style: txtColor,),
|
||||
child: Text('粉色按钮',style: txtColor,),
|
||||
),
|
||||
]),
|
||||
],
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../model/widget.dart';
|
||||
|
||||
import 'package:flutter_go/model/widget.dart';
|
||||
|
||||
import './Expanded/index.dart' as Expanded;
|
||||
|
||||
|
Reference in New Issue
Block a user