This commit is contained in:
xiaojia22326@163.com
2019-01-31 17:18:16 +08:00
parent acfe8f6ed8
commit c4cbd02123
130 changed files with 773 additions and 913 deletions

View File

@ -64,7 +64,7 @@ class _DemoState extends State<Demo> {
*/
Widget allFlatButtons(BuildContext context){
return Container(
//padding: new EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
child: Column(
//mainAxisSize: MainAxisSize.max,
children: <Widget>[
@ -109,7 +109,7 @@ Widget allFlatButtons(BuildContext context){
flatButton.FlatButtonCustom('危险按钮',Colors.pink),
SizedBox(height: 10.0),
flatButton.FlatButtonCustom('点击我试试!', Colors.red,
new Border.all(color: Colors.brown, width: 5.0, style: BorderStyle.solid),
Border.all(color: Colors.brown, width: 5.0, style: BorderStyle.solid),
() => _showMessage('点击了 FLAT BUTTON ', context)),
SizedBox(height: 20.0)
])
@ -126,16 +126,16 @@ void _showMessage(String name, BuildContext context) {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: new Text('提示'),
content: new Text(name),
title: Text('提示'),
content: Text(name),
actions: <Widget>[
new FlatButton(
FlatButton(
// alert 的取消按钮
onPressed: () {
// 取消的事件
Navigator.of(context).pop(true);
},
child: new Text('取消'))
child: Text('取消'))
]);
}
);
@ -145,14 +145,14 @@ void _showMessage(String name, BuildContext context) {
* 带align的text
* */
Widget textAlignBar(String txt){
//style: new TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return new Align(
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
alignment: FractionalOffset.centerLeft,
child: Column(
children: <Widget>[
SizedBox(height: 20.0),
MarkdownBody(data: txt)
//new Text(txt, style: new TextStyle(fontSize: 15.5,height: 1.2,color:Colors.blue),textAlign:TextAlign.left)
// Text(txt, style: TextStyle(fontSize: 15.5,height: 1.2,color:Colors.blue),textAlign:TextAlign.left)
])
);
}