Skip to content

Commit

Permalink
[Mobile] Start the mobile UI
Browse files Browse the repository at this point in the history
  • Loading branch information
gargakshit committed Sep 1, 2020
1 parent 8860f02 commit 95b655d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:passwd/constants/theme.dart';
import 'package:passwd/router/router.gr.dart' as router;
import 'package:passwd/services/locator.dart';
import 'package:stacked_services/stacked_services.dart';
import 'package:supercharged/supercharged.dart';

void main() {
initializeLocator();
Expand Down Expand Up @@ -57,7 +58,11 @@ class MyApp extends StatelessWidget {
scaffoldBackgroundColor: canvasColor,
bottomNavigationBarTheme:
ThemeData.dark().bottomNavigationBarTheme.copyWith(
backgroundColor: Colors.white,
backgroundColor: "#141414".toColor(),
unselectedIconTheme: IconThemeData(
color: Colors.white.withOpacity(0.92),
),
showUnselectedLabels: false,
elevation: 4,
),
cursorColor: primaryColor,
Expand Down
16 changes: 16 additions & 0 deletions lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ class HomeScreen extends StatelessWidget {
viewModelBuilder: () => HomeViewModel(),
builder: (context, model, child) => ScreenTypeBuilder(
mobile: Scaffold(
bottomNavigationBar: BottomNavigationBar(
onTap: (i) {
if (i != model.currentItem) {
model.currentItem = i;
}
},
currentIndex: model.currentItem,
items: navMenuEntries
.map(
(e) => BottomNavigationBarItem(
icon: Icon(e.icon),
label: e.localizationTag,
),
)
.toList(),
),
body: getStack(
model.currentItem,
),
Expand Down

0 comments on commit 95b655d

Please sign in to comment.