1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:font_awesome_flutter/font_awesome_flutter.dart' ;
3
- import 'package:harmony/utilites/constants.dart' ;
4
3
import 'package:harmony/utilites/page_enum.dart' ;
5
4
import 'package:harmony/views/account/account_page.dart' ;
6
5
import 'package:harmony/views/add_place/add_place.dart' ;
@@ -18,19 +17,50 @@ class HarmonyBottomNavigationBar extends StatelessWidget {
18
17
return Row (
19
18
mainAxisAlignment: MainAxisAlignment .spaceAround,
20
19
children: [
21
- Icon (
22
- FontAwesomeIcons .compass,
20
+ IconButton (
21
+ icon: Icon (
22
+ FontAwesomeIcons .compass,
23
23
color: currPage == PAGE_ENUM .DISCOVER_PAGE ? _activeColor : _inactiveColor,
24
+
25
+ ),
26
+ onPressed: () => Navigator .pushReplacement (
27
+
28
+ context,
29
+ PageRouteBuilder (
30
+ pageBuilder: (context, animation1, animation2) => DiscoverPage (),
31
+ transitionDuration: Duration (seconds: 1 ),
32
+ ),
33
+ ),
24
34
),
25
- Icon (
26
- Icons .add_box_outlined,
27
- color: currPage == PAGE_ENUM .NEARBY_PAGE ? _activeColor : _inactiveColor,
35
+ IconButton (
36
+ icon: Icon (
37
+ Icons .add_box_outlined,
38
+ color: currPage == PAGE_ENUM .NEARBY_PAGE ? _activeColor : _inactiveColor,
39
+ ),
40
+ onPressed: () => Navigator .pushReplacement (
41
+
42
+ context,
43
+ PageRouteBuilder (
44
+ pageBuilder: (context, animation1, animation2) => AddPlace (), //TODO ACTUALLY NEARBY!!!
45
+ transitionDuration: Duration (seconds: 1 ),
46
+ ),
47
+ )
28
48
),
29
- Icon (
30
- FontAwesomeIcons .user,
49
+ IconButton (
50
+ icon: Icon (
51
+ FontAwesomeIcons .user,
31
52
color: currPage == PAGE_ENUM .ACCOUNT_PAGE ? _activeColor : _inactiveColor,
53
+ ),
54
+ onPressed: () => Navigator .pushReplacement (
55
+
56
+ context,
57
+ PageRouteBuilder (
58
+ pageBuilder: (context, animation1, animation2) => AccountPage (),
59
+ transitionDuration: Duration (seconds: 1 ),
60
+ ),
61
+ ),//Navigator.pushReplacementNamed(context, routeName),
32
62
)
33
63
],
34
64
);
35
65
}
36
- }
66
+ }
0 commit comments