This commit is contained in:
yifeng.yl
2019-01-08 20:39:13 +08:00
parent 383819e280
commit 2e9702ec7b
242 changed files with 13523 additions and 654 deletions

View File

@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class SizeOverflowBoxDefault extends StatelessWidget {
final double curSizeWidth;
final double curSizeHeight;
final String text;
SizeOverflowBoxDefault(
{Key key,
double this.curSizeWidth,
double this.curSizeHeight,
String this.text})
: super(key: key);
@override
Widget build(BuildContext context) {
return SizedOverflowBox(
size: Size(curSizeWidth, curSizeHeight),
alignment: Alignment.centerRight,
//size属性设置了大小container 里面的大小失效,
child: Container(
color: Color(0xfff06292),
width: 50.0,
height: 50.0,
child: new Text(
text,
style: TextStyle(color: Colors.white),
),
),
);
}
}
class SizeBoxDefault extends StatelessWidget {
final double curWidth;
final double curHeight;
SizeBoxDefault({Key key, double this.curHeight, double this.curWidth})
: super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
width: curWidth,
height: curHeight,
child: const Card(
child: Text(
'SizedBox',
style: TextStyle(color: Colors.white),
textDirection: TextDirection.rtl,
),
color: Color(0xfff06292),
),
);
}
}