Skip to content

Commit

Permalink
Merge pull request #26 from MarsadMaqsood/stable-1.1.0
Browse files Browse the repository at this point in the history
Stable 1.1.0
  • Loading branch information
MarsadMaqsood authored Apr 1, 2024
2 parents a85431f + e676dc0 commit 6848489
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A collection of stylish bottom navigation bars like animated bottom bar and bubb
## ⭐ Installing <a name="installing"></a>

dependencies:
stylish_bottom_bar: ^1.1.0-beta-3
stylish_bottom_bar: ^1.1.0

## ⚡ Import

Expand Down Expand Up @@ -44,6 +44,7 @@ unselectedIconColor:
bubbleFillStyle:
iconStyle:
selectedIcon:
dotStyle:
```

## Properties
Expand All @@ -70,6 +71,7 @@ barStyle → BubbleBarStyle
unselectedIconColor → Color
bubbleFillStyle → BubbleFillStyle
iconStyle → IconStyle
dotStyle → DotStyle
```

### BarStyle
Expand Down
2 changes: 1 addition & 1 deletion lib/model/bar_items.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
7 changes: 6 additions & 1 deletion lib/model/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -23,18 +24,21 @@ 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;

///Border radius of the `BubbleBarItem`
final BorderRadius? borderRadius;

///Add padding arround navigation tiles
///
///Default padding is [EdgeInsets.zero]
final EdgeInsets padding;

Expand All @@ -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;

Expand Down
26 changes: 13 additions & 13 deletions lib/src/bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -278,25 +275,24 @@ class _StylishBottomBarState extends State<StylishBottomBar>
double additionalBottomPadding = 0;
late List<Widget> 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();
}

Expand Down Expand Up @@ -452,9 +448,13 @@ class _StylishBottomBarState extends State<StylishBottomBar>
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,
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: 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

Expand Down

0 comments on commit 6848489

Please sign in to comment.