-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo01.dart
117 lines (103 loc) · 3.22 KB
/
demo01.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// ......card list......
var card = new Card(
child:Column(
children: <Widget>[
ListTile(
title: Text('sydney',style: TextStyle(fontWeight: FontWeight.w500),),
subtitle: Text('maben:0451855667'),
leading: new Icon(Icons.account_box,color: Colors.lightBlue,)),
new Divider(),
ListTile(
title: Text('Brisbane',style: TextStyle(fontWeight: FontWeight.w500),),
subtitle: Text('mabener:0451833667'),
leading: new Icon(Icons.account_box,color: Colors.lightBlue,)),
new Divider(),
ListTile(
title: Text('Melben',style: TextStyle(fontWeight: FontWeight.w500),),
subtitle: Text('xiaomaben:0451877667'),
leading: new Icon(Icons.account_box,color: Colors.lightBlue,)),
],
)
);
// ......images with text......
// var stack = new Stack(
// alignment: const FractionalOffset(0.5,0.8),
// children:<Widget> [
// new CircleAvatar(
// backgroundImage: new AssetImage('images/1.png'),
// radius: 100.0,
// ),
// // new Container(
// // decoration: new BoxDecoration(
// // color: Colors.lightBlue,
// // ),
// // padding: EdgeInsets.all(5.0),
// // child: new Text(' button'),
// // ),
// new Positioned(
// top: 10.0,
// left: 50.0,
// child: new Text('xiaomaben'),
// ),
// new Positioned(
// bottom: 10.0,
// right: 10.0,
// child: new Text('maben'),
// ),
//
// ],
// );
// TODO: implement build
return MaterialApp(
title: 'Row Widget demo',
home: Scaffold(
appBar: new AppBar(
title: new Text('horizontal direction structure'),
),
body: Center(
child: card,
),
//......locate text......
// body: Center(child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Text('xiao maben'),
// Text('xiaoma ben'),
// Expanded(child: Text('xiao ma bennnnn')),
// Text(' xiao ma ben '),
// ],
// ),
// )
//......buttons......
// body: new Row(
// children: <Widget>[
// Expanded(child: new RaisedButton(
// onPressed:(){},
// color: Colors.redAccent,
// child: new Text(' button'),
// ) ,),
// new RaisedButton(
// onPressed:(){},
// color: Colors.blueAccent,
// child: new Text('blue button'),
// ) ,
// Expanded(child: new RaisedButton(
// onPressed:(){},
// color: Colors.orange,
// child: new Text(' button'),
// ) ,),
//
// ],
// )
),
);
}
}