-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.dart
50 lines (47 loc) · 1.25 KB
/
home.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
import 'package:flutter/material.dart';
class HomePage extends StatelessWidget {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
HomePage({Key key, this.favoriteHotel}) : super(key: key);
List<bool> favoriteHotel = [true, true, true, true, true, true];
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
appBar: AppBar(
leading: Builder(
builder: (context) => IconButton(
icon: Icon(
Icons.menu,
semanticLabel: 'menu',
),
onPressed: (){
_scaffoldKey.currentState.openDrawer();
},
),
),
centerTitle: true,
title: Text('Hotel Info'),
actions: <Widget>[
IconButton(
icon: Icon(
Icons.search,
semanticLabel: 'search',
),
onPressed: () {
Navigator.pushNamed(context, '/search');
},
),
IconButton(
icon: Icon(
Icons.tune,
semanticLabel: 'filter',
),
onPressed: () {
print('Filter button');
},
),
],
),
);
}
}