Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
g-apparence committed Oct 11, 2023
1 parent 96ef050 commit 4672418
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.2.0]
* Add BartMenuRoute.bottomBarBuilder to build a single item bottom bar (so you can show notification badge on it)
* Add onRouteChanged callback to BartScaffold to get notified when route change

## [1.1.0]
* Material 3 bottom bar theme
* Hide / show bottom bar from action
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,39 @@ ThemeData(
```

## 🗃  Bottom icon notfication badge

You can add a notification badge on your bottom bar icon. <br/>

To do that, you need to use the `BartMenuRoute.bottomBarBuilder` method instead of `BartMenuRoute.bottomBar` in your route definitions:

```dart
BartMenuRoute.bottomBarBuilder(
label: "Library",
builder: (context) => BottomBarIcon.builder(
icon: const Icon(Icons.video_library_outlined),
notificationBuilder: (context) => Container(
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
padding: const EdgeInsets.all(4),
child: const Text(
"1",
style: TextStyle(color: Colors.white, fontSize: 10),
),
),
),
path: '/library',
pageBuilder: (parentContext, tabContext, settings) => const FakeListPage(
key: PageStorageKey<String>("library"),
),
transitionDuration: bottomBarTransitionDuration,
transitionsBuilder: bottomBarTransition,
),
```


## 🗃&nbsp; State caching

### How it works 🤔 ?
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bart
description: A bottom navigation bar using navigator 2 for switching tabs
version: 1.1.0
version: 1.2.0
homepage: https://en.apparence.io
repository: https://github.com/Apparence-io/bart

Expand Down

0 comments on commit 4672418

Please sign in to comment.