@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
4
4
import 'package:dropdown_menu/dropdown_header.dart' ;
5
5
import 'dart:math' as math;
6
6
import 'package:dropdown_menu/dropdown_templates.dart' ;
7
- import 'package:async_loader/async_loader.dart' ;
8
7
import 'package:dropdown_menu/dropdown_sliver.dart' ;
9
8
import 'package:dropdown_menu/dropdown_menu.dart' ;
10
9
import 'package:dropdown_menu/dropdown_list_menu.dart' ;
@@ -20,14 +19,6 @@ class MyApp extends StatelessWidget {
20
19
return new MaterialApp (
21
20
title: 'Flutter Demo' ,
22
21
theme: new ThemeData (
23
- // This is the theme of your application.
24
- //
25
- // Try running your application with "flutter run". You'll see the
26
- // application has a blue toolbar. Then, without quitting the app, try
27
- // changing the primarySwatch below to Colors.green and then invoke
28
- // "hot reload" (press "r" in the console where you ran "flutter run",
29
- // or press Run > Flutter Hot Reload in IntelliJ). Notice that the
30
- // counter didn't reset back to zero; the application is not restarted.
31
22
primarySwatch: Colors .blue,
32
23
scaffoldBackgroundColor: Colors .white),
33
24
home: new MyHomePage (title: 'Flutter Demo Home Page' ),
@@ -38,15 +29,6 @@ class MyApp extends StatelessWidget {
38
29
class MyHomePage extends StatefulWidget {
39
30
MyHomePage ({Key key, this .title}) : super (key: key);
40
31
41
- // This widget is the home page of your application. It is stateful, meaning
42
- // that it has a State object (defined below) that contains fields that affect
43
- // how it looks.
44
-
45
- // This class is the configuration for the state. It holds the values (in this
46
- // case the title) provided by the parent (in this case the App widget) and
47
- // used by the build method of the State. Fields in a Widget subclass are
48
- // always marked "final".
49
-
50
32
final String title;
51
33
52
34
@override
@@ -265,7 +247,10 @@ class _MyHomePageState extends State<MyHomePage> {
265
247
(BuildContext context, int index) {
266
248
return new Container (
267
249
color: Colors .black26,
268
- child: new Image .asset ("images/header.jpg" ,fit: BoxFit .fill,),
250
+ child: new Image .asset (
251
+ "images/header.jpg" ,
252
+ fit: BoxFit .fill,
253
+ ),
269
254
);
270
255
}, childCount: 1 )),
271
256
new SliverPersistentHeader (
@@ -283,7 +268,10 @@ class _MyHomePageState extends State<MyHomePage> {
283
268
(BuildContext context, int index) {
284
269
return new Container (
285
270
color: Theme .of (context).scaffoldBackgroundColor,
286
- child: new Image .asset ("images/body.jpg" ,fit: BoxFit .fill,),
271
+ child: new Image .asset (
272
+ "images/body.jpg" ,
273
+ fit: BoxFit .fill,
274
+ ),
287
275
);
288
276
}, childCount: 10 )),
289
277
]),
@@ -321,22 +309,20 @@ class _MyHomePageState extends State<MyHomePage> {
321
309
appBar: new AppBar (
322
310
title: new Text (widget.title),
323
311
),
324
- body: _currentIndex == 0 ? buildFixHeaderDropdownMenu () : buildInnerListHeaderDropdownMenu (),
312
+ body: _currentIndex == 0
313
+ ? buildFixHeaderDropdownMenu ()
314
+ : buildInnerListHeaderDropdownMenu (),
325
315
bottomNavigationBar: new BottomNavigationBar (
326
- onTap: (int index){
327
-
328
- setState (() {
329
-
330
- _currentIndex = index;
331
-
332
- });
333
-
334
- },
335
- currentIndex: _currentIndex,
316
+ onTap: (int index) {
317
+ setState (() {
318
+ _currentIndex = index;
319
+ });
320
+ },
321
+ currentIndex: _currentIndex,
336
322
items: [
337
- {"name" : "Fix" , "icon" : Icons .hearing},
338
- {"name" : "ScrollView" , "icon" : Icons .list}
339
- ]
323
+ {"name" : "Fix" , "icon" : Icons .hearing},
324
+ {"name" : "ScrollView" , "icon" : Icons .list}
325
+ ]
340
326
.map ((dynamic data) => new BottomNavigationBarItem (
341
327
title: new Text (data["name" ]), icon: new Icon (data["icon" ])))
342
328
.toList ()),
0 commit comments