mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-09-27 08:34:06 +08:00
fix:code
This commit is contained in:
@ -7,10 +7,7 @@ class SizeOverflowBoxDefault extends StatelessWidget {
|
||||
final String text;
|
||||
|
||||
SizeOverflowBoxDefault(
|
||||
{Key key,
|
||||
this.curSizeWidth,
|
||||
this.curSizeHeight,
|
||||
this.text})
|
||||
{Key key, this.curSizeWidth, this.curSizeHeight, this.text})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@ -23,7 +20,7 @@ class SizeOverflowBoxDefault extends StatelessWidget {
|
||||
color: Color(0xfff06292),
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
child: new Text(
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -36,8 +33,7 @@ class SizeBoxDefault extends StatelessWidget {
|
||||
final double curWidth;
|
||||
final double curHeight;
|
||||
|
||||
SizeBoxDefault({Key key, this.curHeight, this.curWidth})
|
||||
: super(key: key);
|
||||
SizeBoxDefault({Key key, this.curHeight, this.curWidth}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_go/components/widget_demo.dart';
|
||||
import './demo.dart' as sizeBox;
|
||||
import './demo.dart';
|
||||
|
||||
// const String _Text = """### **SizeBox简介**
|
||||
// > 常用的一个控件,设置具体尺寸。
|
||||
@ -53,47 +53,47 @@ class _DemoState extends State<Demo> {
|
||||
}
|
||||
|
||||
Column _sizedOverflowBoxCreate() {
|
||||
return new Column(
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
sizeBox.SizeBoxDefault(
|
||||
SizeBoxDefault(
|
||||
curWidth: 200.0,
|
||||
curHeight: 50.0,
|
||||
),
|
||||
SizedBox(height: 20.0),
|
||||
Container(
|
||||
margin: new EdgeInsets.only(top: 10.0),
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
color: Color(0xffd81b60),
|
||||
width: 200.0,
|
||||
height: 50.0,
|
||||
),
|
||||
Container(
|
||||
margin: new EdgeInsets.only(top: 10.0),
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
color: Color(0xffd81b60),
|
||||
alignment: Alignment.topCenter,
|
||||
width: 200.0,
|
||||
height: 50.0,
|
||||
child: sizeBox.SizeOverflowBoxDefault(
|
||||
child: SizeOverflowBoxDefault(
|
||||
text: "SizeBox",
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: new EdgeInsets.only(top: 10.0),
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
color: Color(0xffd81b60),
|
||||
width: 200.0,
|
||||
height: 50.0,
|
||||
child: sizeBox.SizeOverflowBoxDefault(
|
||||
child: SizeOverflowBoxDefault(
|
||||
text: "box",
|
||||
curSizeWidth: 100.0,
|
||||
curSizeHeight: 20.0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: new EdgeInsets.only(top: 10.0),
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
color: Color(0xffd81b60),
|
||||
width: 200.0,
|
||||
height: 50.0,
|
||||
alignment: Alignment.center,
|
||||
child: sizeBox.SizeOverflowBoxDefault(
|
||||
child: SizeOverflowBoxDefault(
|
||||
text: "box",
|
||||
curSizeWidth: 100.0,
|
||||
curSizeHeight: 20.0,
|
||||
|
Reference in New Issue
Block a user