diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e1efb..b339db3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 1.1.0 +- Added new style `DotBarOptions` +- Improved `BarAnimation.liquid` +- Updated documentation +- Removed unnecessary code + +## 1.1.0-beta-3 +- Updated documentation + ## 1.1.0-beta-2 - Optimized the performance of `DotBarOptions` style - Fixed: `Badge` padding issue [#22](https://github.com/MarsadMaqsood/stylish_bottom_bar/issues/22#issue-2029833633) diff --git a/README.md b/README.md index 5843802..dba7516 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A collection of stylish bottom navigation bars like animated bottom bar and bubb ## ⭐ Installing dependencies: - stylish_bottom_bar: ^1.1.0-beta-3 + stylish_bottom_bar: ^1.1.0 ## ⚡ Import @@ -44,6 +44,7 @@ unselectedIconColor: bubbleFillStyle: iconStyle: selectedIcon: +dotStyle: ``` ## Properties @@ -70,6 +71,7 @@ barStyle → BubbleBarStyle unselectedIconColor → Color bubbleFillStyle → BubbleFillStyle iconStyle → IconStyle +dotStyle → DotStyle ``` ### BarStyle diff --git a/lib/model/bar_items.dart b/lib/model/bar_items.dart index 94fabe5..b9e9516 100644 --- a/lib/model/bar_items.dart +++ b/lib/model/bar_items.dart @@ -25,7 +25,7 @@ class BottomBarItem { ///Use this to add item title final Widget? title; - ///Set widget to display as a badge + ///Set the widget to display as a badge /// ///```dart ///badge: Text('90'), diff --git a/lib/model/options.dart b/lib/model/options.dart index 509834a..f0876f3 100644 --- a/lib/model/options.dart +++ b/lib/model/options.dart @@ -15,6 +15,7 @@ class BubbleBarOptions extends BottomBarOption { ///BarStyle to align icon and title in horizontal or vertical ///[BubbleBarStyle.horizontal] ///[BubbleBarStyle.vertical] + /// ///Default value is [BubbleBarStyle.horizontal] final BubbleBarStyle barStyle; @@ -23,11 +24,13 @@ class BubbleBarOptions extends BottomBarOption { ///and also fill the background with color using [BubbleFillStyle.fill] final BubbleFillStyle bubbleFillStyle; - ///Change Icon size + ///Change icon size + /// ///Default is 26.0 final double iconSize; ///Enable ink effect to bubble navigation bar item + /// ///Default value is `false` final bool inkEffect; @@ -35,6 +38,7 @@ class BubbleBarOptions extends BottomBarOption { final BorderRadius? borderRadius; ///Add padding arround navigation tiles + /// ///Default padding is [EdgeInsets.zero] final EdgeInsets padding; @@ -44,6 +48,7 @@ class BubbleBarOptions extends BottomBarOption { final Color inkColor; /// Specifies the opacity of the navigation bar items' backgrounds. + /// /// The default value is `0.8`. final double? opacity; diff --git a/lib/src/bottom_bar.dart b/lib/src/bottom_bar.dart index d7fc072..e67cc69 100644 --- a/lib/src/bottom_bar.dart +++ b/lib/src/bottom_bar.dart @@ -97,12 +97,9 @@ class StylishBottomBar extends StatefulWidget { ///Default value is 8.0 final double elevation; - ///Change Icon size - ///Default is 26.0 - // final double? iconSize; - ///Used to change the selected item index - /// Default is 0 + /// + /// Default value is 0 final int currentIndex; ///Add notch effect to floating action button @@ -278,25 +275,24 @@ class _StylishBottomBarState extends State double additionalBottomPadding = 0; late List listWidget; + final mediaQuery = MediaQuery.of(context); + dynamic options; if (widget.option.runtimeType == AnimatedBarOptions) { options = widget.option as AnimatedBarOptions; additionalBottomPadding = - math.max(MediaQuery.of(context).padding.bottom - bottomMargin, 0.0) + - 2; + math.max(mediaQuery.padding.bottom - bottomMargin, 0.0) + 2; listWidget = _animatedBarChilds(); } else if (widget.option.runtimeType == BubbleBarOptions) { options = widget.option as BubbleBarOptions; additionalBottomPadding = - math.max(MediaQuery.of(context).padding.bottom - bottomMargin, 0.0) + - 4; + math.max(mediaQuery.padding.bottom - bottomMargin, 0.0) + 4; listWidget = _bubbleBarTiles(); } else if (widget.option.runtimeType == DotBarOptions) { options = widget.option as DotBarOptions; additionalBottomPadding = - math.max(MediaQuery.of(context).padding.bottom - bottomMargin, 0.0) + - 4; + math.max(mediaQuery.padding.bottom - bottomMargin, 0.0) + 4; listWidget = _dotBarChilds(); } @@ -452,9 +448,13 @@ class _StylishBottomBarState extends State list.insert( 2, list.length > 3 - ? Flex( + ? const Flex( direction: Axis.horizontal, - children: [Padding(padding: EdgeInsets.all(12))], + children: [ + Padding( + padding: EdgeInsets.all(12), + ), + ], ) : const Spacer( flex: 2, diff --git a/pubspec.yaml b/pubspec.yaml index 3d4d1d1..88bc2f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: stylish_bottom_bar description: A collection of stylish bottom navigation bars like animated bottom bar and bubble bottom bar for flutter. -version: 1.1.0-beta-3 +version: 1.1.0 #homepage: https://github.com/MarsadMaqsood/Stylish_bottom_bar repository: https://github.com/MarsadMaqsood/Stylish_bottom_bar