Skip to content

Commit

Permalink
feat: Update bottom navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
0niel committed Jan 6, 2024
1 parent 283dcc9 commit 5bb7883
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 49 deletions.
45 changes: 6 additions & 39 deletions lib/presentation/pages/scaffold_with_nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:rtu_mirea_app/presentation/app_notifier.dart';
import 'package:rtu_mirea_app/presentation/theme.dart';
import 'package:rtu_mirea_app/presentation/typography.dart';
import 'package:unicons/unicons.dart';
import 'package:dot_navigation_bar/dot_navigation_bar.dart';
import 'package:salomon_bottom_bar/salomon_bottom_bar.dart';
import '../constants.dart';

Expand Down Expand Up @@ -43,45 +42,13 @@ class ScaffoldWithNavBar extends StatelessWidget {
body: Consumer<AppNotifier>(
builder: (_, value, child) => navigationShell,
),
extendBody: true,
bottomNavigationBar: DotNavigationBar(
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 8,
),
],
marginR: const EdgeInsets.symmetric(horizontal: 16),
paddingR:
const EdgeInsets.only(bottom: 5, top: 7, right: 8, left: 8),
backgroundColor: AppTheme.colors.background03,
splashBorderRadius: 30,
currentIndex: navigationShell.currentIndex,
onTap: (index) => _setActiveIndex(index),
items: [
DotNavigationBarItem(
icon: const Icon(Icons.library_books_rounded),
selectedColor: AppTheme.colors.colorful02,
),
DotNavigationBarItem(
icon: const Icon(Icons.calendar_today_rounded),
selectedColor: AppTheme.colors.colorful03,
),
DotNavigationBarItem(
icon: const Icon(Icons.widgets_rounded),
selectedColor: AppTheme.colors.colorful04,
),
isDesktop
? DotNavigationBarItem(
icon: const Icon(UniconsLine.info_circle),
selectedColor: AppTheme.colors.colorful06,
)
: DotNavigationBarItem(
icon: const Icon(Icons.person),
selectedColor: AppTheme.colors.colorful06,
bottomNavigationBar:
navigationShell.route.toString().contains('home')
? null
: AppBottomNavigationBar(
index: navigationShell.currentIndex,
onClick: (index) => _setActiveIndex(index),
),
],
),
);
}
},
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.2"
dot_navigation_bar:
dependency: "direct main"
description:
name: dot_navigation_bar
sha256: "753e1d91644e39beddd0a4ed7e366f37a95e38cafb601c3b7496120ae0532f63"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
equatable:
dependency: "direct main"
description:
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ publish_to: 'none'
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.2+54
version: 1.4.2+55

environment:
sdk: ">=3.1.1"
Expand Down Expand Up @@ -46,7 +46,6 @@ dependencies:
hydrated_bloc: ^9.1.2

bloc_concurrency: ^0.2.2
dot_navigation_bar: ^1.0.2

# A wrapper around InheritedWidget to make them easier to use and more reusable.
# See https://pub.dev/packages/provider
Expand Down

0 comments on commit 5bb7883

Please sign in to comment.