This commit is contained in:
parent
6eb6f9809e
commit
511e8cda76
9 changed files with 204 additions and 40 deletions
|
@ -1,8 +1,9 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:simple_git/resources/colors_schemes/lib_color_schemes.g.dart';
|
||||
|
||||
import 'page/actions_page.dart';
|
||||
import 'page/more_page.dart';
|
||||
import 'page/repos_page.dart';
|
||||
|
||||
void main() {
|
||||
|
@ -34,7 +35,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
|
||||
final screens = [
|
||||
ReposPage(),
|
||||
ActionPage(),
|
||||
MorePage(),
|
||||
];
|
||||
|
||||
@override
|
||||
|
@ -43,6 +44,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
body: screens[_index],
|
||||
bottomNavigationBar: NavigationBarTheme(
|
||||
data: NavigationBarThemeData(
|
||||
indicatorColor: darkColorScheme.primary,
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
),
|
||||
|
@ -50,10 +52,13 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
child: NavigationBar(
|
||||
height: 70,
|
||||
selectedIndex: _index,
|
||||
onDestinationSelected: (index) => setState(() => this._index = index),
|
||||
destinations: const [
|
||||
NavigationDestination(icon: Icon(Icons.home_outlined), selectedIcon: Icon(Icons.home), label: 'Repos'),
|
||||
NavigationDestination(icon: Icon(Icons.add_outlined), selectedIcon: Icon(Icons.add), label: 'Actions')
|
||||
backgroundColor: lightColorScheme.primaryContainer,
|
||||
onDestinationSelected: (index) => setState(() {
|
||||
this._index = index;
|
||||
}),
|
||||
destinations: [
|
||||
NavigationDestination(icon: Icon(Icons.home_outlined, color: lightColorScheme.onPrimaryContainer), selectedIcon: Icon(Icons.home), label: 'Repos'),
|
||||
NavigationDestination(icon: Icon(Icons.more_horiz_outlined, color: lightColorScheme.onPrimaryContainer), selectedIcon: Icon(Icons.more_horiz), label: 'More'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue