@@ -39,86 +39,88 @@ class _MobileScreenLayoutState extends State<MobileScreenLayout> {
39
39
@override
40
40
Widget build (BuildContext context) {
41
41
UserDetails userDetails = Provider .of <UserProvider >(context).getUser;
42
- return Scaffold (
43
- body: pages[_seletedIndex],
44
- bottomNavigationBar: BottomNavigationBar (
45
- type: BottomNavigationBarType .fixed,
46
- currentIndex: _seletedIndex,
47
- onTap: (index) {
48
- setState (() {
49
- _seletedIndex = index;
50
- });
51
- },
52
- backgroundColor: mobileBackgroundColor,
53
- showSelectedLabels: false ,
54
- showUnselectedLabels: false ,
55
- items: [
56
- BottomNavigationBarItem (
42
+ return SafeArea (
43
+ child: Scaffold (
44
+ body: pages[_seletedIndex],
45
+ bottomNavigationBar: BottomNavigationBar (
46
+ type: BottomNavigationBarType .fixed,
47
+ currentIndex: _seletedIndex,
48
+ onTap: (index) {
49
+ setState (() {
50
+ _seletedIndex = index;
51
+ });
52
+ },
53
+ backgroundColor: mobileBackgroundColor,
54
+ showSelectedLabels: false ,
55
+ showUnselectedLabels: false ,
56
+ items: [
57
+ BottomNavigationBarItem (
58
+ backgroundColor: primaryColor,
59
+ label: '' ,
60
+ icon: Icon (
61
+ _seletedIndex == 0 ? Icons .home_filled : Icons .home_outlined,
62
+ color: _seletedIndex == 0 ? primaryColor : secondaryColor,
63
+ // color: primaryColor,
64
+ size: 32 ,
65
+ )),
66
+ BottomNavigationBarItem (
67
+ backgroundColor: primaryColor,
68
+ label: '' ,
69
+ icon: Icon (
70
+ _seletedIndex == 1
71
+ ? Icons .search_outlined
72
+ : Icons .search_rounded,
73
+ color: _seletedIndex == 0 ? primaryColor : secondaryColor,
74
+ size: 32 ,
75
+ )),
76
+ // BottomNavigationBarItem(
77
+ // backgroundColor: primaryColor,
78
+ // label: '',
79
+ // icon: SvgPicture.asset(
80
+ // 'assets/search-line-icon.svg',
81
+ // color: _seletedIndex == 1 ? primaryColor : secondaryColor,
82
+ // height: 32,
83
+ // width: 32,
84
+ // )),
85
+ BottomNavigationBarItem (
86
+ backgroundColor: primaryColor,
87
+ label: '' ,
88
+ icon: SvgPicture .asset (
89
+ 'assets/add-square-outline.svg' , //TODO add box sharp icon
90
+ color: _seletedIndex == 2 ? primaryColor : secondaryColor,
91
+ height: 32 ,
92
+ width: 32 ,
93
+ )),
94
+ BottomNavigationBarItem (
95
+ backgroundColor: primaryColor,
96
+ label: '' ,
97
+ icon: SvgPicture .asset (
98
+ 'assets/instagram-reels-icon.svg' ,
99
+ color: _seletedIndex == 3 ? primaryColor : secondaryColor,
100
+ height: 32 ,
101
+ width: 32 ,
102
+ )),
103
+ BottomNavigationBarItem (
57
104
backgroundColor: primaryColor,
58
105
label: '' ,
59
- icon: Icon (
60
- _seletedIndex == 0 ? Icons .home_filled : Icons .home_outlined,
61
- color: _seletedIndex == 0 ? primaryColor : secondaryColor,
62
- // color: primaryColor,
63
- size: 32 ,
64
- )),
65
- BottomNavigationBarItem (
66
- backgroundColor: primaryColor,
67
- label: '' ,
68
- icon: Icon (
69
- _seletedIndex == 1
70
- ? Icons .search_outlined
71
- : Icons .search_rounded,
72
- color: _seletedIndex == 0 ? primaryColor : secondaryColor,
73
- size: 32 ,
74
- )),
75
- // BottomNavigationBarItem(
76
- // backgroundColor: primaryColor,
77
- // label: '',
78
- // icon: SvgPicture.asset(
79
- // 'assets/search-line-icon.svg',
80
- // color: _seletedIndex == 1 ? primaryColor : secondaryColor,
81
- // height: 32,
82
- // width: 32,
83
- // )),
84
- BottomNavigationBarItem (
85
- backgroundColor: primaryColor,
86
- label: '' ,
87
- icon: SvgPicture .asset (
88
- 'assets/add-square-outline.svg' , //TODO add box sharp icon
89
- color: _seletedIndex == 2 ? primaryColor : secondaryColor,
90
- height: 32 ,
91
- width: 32 ,
92
- )),
93
- BottomNavigationBarItem (
94
- backgroundColor: primaryColor,
95
- label: '' ,
96
- icon: SvgPicture .asset (
97
- 'assets/instagram-reels-icon.svg' ,
98
- color: _seletedIndex == 3 ? primaryColor : secondaryColor,
99
- height: 32 ,
100
- width: 32 ,
101
- )),
102
- BottomNavigationBarItem (
103
- backgroundColor: primaryColor,
104
- label: '' ,
105
- icon: Container (
106
- height: 35 ,
107
- width: 35 ,
108
- decoration: BoxDecoration (
109
- border: Border .all (
110
- color: _seletedIndex == 4
111
- ? primaryColor
112
- : const Color .fromARGB (255 , 122 , 118 , 118 ),
113
- ),
114
- color: primaryColor,
115
- shape: BoxShape .circle),
116
- child: CircleAvatar (
117
- backgroundImage: NetworkImage (userDetails.profileUrl),
106
+ icon: Container (
107
+ height: 35 ,
108
+ width: 35 ,
109
+ decoration: BoxDecoration (
110
+ border: Border .all (
111
+ color: _seletedIndex == 4
112
+ ? primaryColor
113
+ : const Color .fromARGB (255 , 122 , 118 , 118 ),
114
+ ),
115
+ color: primaryColor,
116
+ shape: BoxShape .circle),
117
+ child: CircleAvatar (
118
+ backgroundImage: NetworkImage (userDetails.profileUrl),
119
+ ),
118
120
),
119
- ),
120
- )
121
- ] ,
121
+ )
122
+ ],
123
+ ) ,
122
124
),
123
125
);
124
126
}
0 commit comments