@@ -10,7 +10,7 @@ class MyApp extends StatelessWidget {
1010 @override
1111 Widget build (BuildContext context) {
1212 return WeUIApp (
13- theme: WeUIThemeData .dark (),
13+ theme: WeUIThemeData .light (),
1414 child: MaterialApp (
1515 title: 'Flutter Demo' ,
1616 color: Colors .red,
@@ -68,93 +68,145 @@ class _MyHomePageState extends State<MyHomePage> {
6868 body: ListView (
6969 //physics: BouncingScrollPhysics(),
7070 children: < Widget > [
71- Center (
72- // Center is a layout widget. It takes a single child and positions it
73- // in the middle of the parent.
74- child: Column (
71+ Column (
7572 mainAxisAlignment: MainAxisAlignment .center,
76- children: < Widget > [
77- Button (text: 'dark' ,onPress: dark),
78- Button (type: ButtonType .primay,text: 'light' ,onPress: light,),
79- Button (type: ButtonType .warn,onPress: (){
80- Toast .success (context, "dfsdf" );
81- },),
82- Button (loading: true ,),
83- Button (type: ButtonType .primay,loading: true ,),
84- Button (type: ButtonType .warn,loading: true ,),
85- Button (disabled: true ,),
86- Button (type: ButtonType .primay,disabled: true ,),
87- Button (type: ButtonType .warn,onPress: (){
88- Toast .close (context);
89- },),
90- Button (mini: true ,onPress: ()async {
91- Toast .loading (context, "dsfsfd" );
92- await Future .delayed (Duration (seconds: 2 ));
93- Toast .close (context);
94- }),
95- PreView (
96- header: PreViewHeader (
97- label: "Header" ,
98- value: "sdfs" ,
99- ),
100- body: PreViewBody (
101- children: [
102- PreViewItem (
73+ crossAxisAlignment: CrossAxisAlignment .start,
74+ children: < Widget > [
75+ Button (text: 'dark' ,onPress: dark),
76+ Button (type: ButtonType .primay,text: 'light' ,onPress: light,),
77+ Button (type: ButtonType .warn,onPress: (){
78+ Toast .success (context, "dfsdf" );
79+ },),
80+ Button (loading: true ,),
81+ Button (type: ButtonType .primay,loading: true ,),
82+ Button (type: ButtonType .warn,loading: true ,),
83+ Button (disabled: true ,),
84+ Button (type: ButtonType .primay,disabled: true ,),
85+ Button (type: ButtonType .warn,onPress: (){
86+ Toast .close (context);
87+ },),
88+ Button (mini: true ,onPress: ()async {
89+ Toast .loading (context, "dsfsfd" );
90+ await Future .delayed (Duration (seconds: 2 ));
91+ Toast .close (context);
92+ }),
93+ PreView (
94+ header: PreViewHeader (
95+ label: "Header" ,
96+ value: "sdfs" ,
97+ ),
98+ body: PreViewBody (
99+ children: [
100+ PreViewItem (
101+ label: 'Item' ,
102+ value: '123'
103+ ),
104+ PreViewItem (
103105 label: 'Item' ,
104106 value: '123'
105- ),
106- PreViewItem (
107- label: 'Item' ,
108- value: '123'
109- ),
110- PreViewItem (
111- label: 'Item' ,
112- value: '123'
113- ),
114- PreViewItem (
115- label: 'Item' ,
116- value: '123fsafsafsafsfsafsfssfwerrqreqwrwrsafsaffsfsfsfsfsfsfsfsfsf'
117- )
118- ],
119- ),
120- footer: PreViewFooter (
121- children: [
122- PreViewButton (text: "sdfs" ,),
123- PreViewButton (text: "sfds" ,primary: true ,onPressed: (){},)
124- ],
125- ),
107+ ),
108+ PreViewItem (
109+ label: 'Item' ,
110+ value: '123'
111+ ),
112+ PreViewItem (
113+ label: 'Item' ,
114+ value: '123fsafsafsafsfsafsfssfwerrqreqwrwrsafsaffsfsfsfsfsfsfsfsfsf'
115+ )
116+ ],
117+ ),
118+ footer: PreViewFooter (
119+ children: [
120+ PreViewButton (text: "sdfs" ,),
121+ PreViewButton (text: "sfds" ,primary: true ,onPressed: (){},)
122+ ],
123+ ),
124+ ),
125+ Panel (
126+ header: PanelHeader (child: Text ('文字列表组合' ),
126127 ),
127- buildCells (context),
128- WeUIApp (child:
129- Footer (
130- // text: "sdfsfd",
131- links: [Link (text: "sdfds" ), Link (text: "sdfsf" )],
132- ),),
133- Article (
128+ child: Column (
129+ crossAxisAlignment: CrossAxisAlignment .start,
134130 children: < Widget > [
135- H1 (
136- text: "大标题" ,
131+ MediaBox (
132+ onPress: (){},
133+ child: Column (
134+ crossAxisAlignment: CrossAxisAlignment .start,
135+ children: < Widget > [
136+ MediaBoxTitle (
137+ child: Text ('标题1' ),
138+ ),
139+ MediaBoxDesc (
140+ child: Text ("各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述" ),
141+ )
142+ ],
143+ ),
144+ ),
145+ MediaBox (
146+ child: Column (
147+ crossAxisAlignment: CrossAxisAlignment .start,
148+ children: < Widget > [
149+ MediaBoxTitle (
150+ child: Text ('标题1' ),
151+ ),
152+ MediaBoxDesc (
153+ child: Text ("各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述" ),
154+ )
155+ ],
156+ ),
137157 ),
138- Section (
139- children: < Widget > [
140- H2 (text: "章标题" ),
141- Section (
158+ MediaBox (
159+ child: MediaBoxAppMsg (
160+ header: Container (
161+ width: double .infinity,
162+ height: double .infinity,
163+ color: Colors .grey,
164+ ),
165+ body: Column (
166+ crossAxisAlignment: CrossAxisAlignment .start,
142167 children: < Widget > [
143- H3 (
144- text : "节标题" ,
168+ MediaBoxTitle (
169+ child : Text ( '标题1' ) ,
145170 ),
146- P (
147- text:
148- '''Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo''' ,
171+ MediaBoxDesc (
172+ child: Text ("描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述各种描述" ),
149173 )
150174 ],
151- )
152- ],
175+ ),
176+ )
153177 )
154178 ],
155- )
156- ],
157- ),
179+ ),
180+ ),
181+ WeUIApp (child:
182+ Footer (
183+ // text: "sdfsfd",
184+ links: [Link (text: "sdfds" ), Link (text: "sdfsf" )],
185+ ),),
186+ Article (
187+ children: < Widget > [
188+ H1 (
189+ text: "大标题" ,
190+ ),
191+ Section (
192+ children: < Widget > [
193+ H2 (text: "章标题" ),
194+ Section (
195+ children: < Widget > [
196+ H3 (
197+ text: "节标题" ,
198+ ),
199+ P (
200+ text:
201+ '''Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo''' ,
202+ )
203+ ],
204+ )
205+ ],
206+ )
207+ ],
208+ )
209+ ],
158210 )
159211 ],
160212 ),
0 commit comments