Skip to content

Commit

Permalink
bug-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Majidbouikken committed Sep 22, 2021
1 parent e6c0729 commit d162451
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.3+1] - 2021-09-22
- Fixed a bug

## [0.0.3] - 2021-09-21
- Fixed a bug

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.2"
version: "0.0.3"
async:
dependency: transitive
description:
Expand Down
11 changes: 5 additions & 6 deletions lib/animatedNavBar.dart
Expand Up @@ -23,6 +23,7 @@ class AnimatedNavBar extends StatefulWidget {
/// If the [textStyle] argument is null, the AnimatedNavBar will use the style from the
/// closest enclosing [DefaultTextStyle].
final int defaultPage;
final bool activeButtonIsWide;
final Color iconColor;
final Color inactiveColor;
final Radius borderRadius;
Expand All @@ -35,6 +36,7 @@ class AnimatedNavBar extends StatefulWidget {
this.padding = 8,
this.color,
this.defaultPage = 0,
this.activeButtonIsWide = false,
this.iconColor,
this.inactiveColor,
this.borderRadius,
Expand All @@ -53,9 +55,6 @@ class _AnimatedNavBarState extends State<AnimatedNavBar> {
double tabButtonHeight;
Color icnColor;

/// style parameters
bool wideActiveButton = false;

/// turn into these parameters
int defaultFlex = 1;

Expand All @@ -77,7 +76,7 @@ class _AnimatedNavBarState extends State<AnimatedNavBar> {
(color.green * 0.2).toInt(), (color.blue * 0.2).toInt());

/// style init state
if (wideActiveButton)
if (widget.activeButtonIsWide)
defaultFlex = 3;
else
defaultFlex = 1;
Expand Down Expand Up @@ -132,7 +131,7 @@ class _AnimatedNavBarState extends State<AnimatedNavBar> {
height: tabButtonHeight,
alignment: Alignment.center,
child: (selected == i)
? (this.wideActiveButton)
? (this.widget.activeButtonIsWide)
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
Expand Down Expand Up @@ -172,7 +171,7 @@ class _AnimatedNavBarState extends State<AnimatedNavBar> {
TextOverflow.ellipsis,
)
])
: (this.wideActiveButton)
: (this.widget.activeButtonIsWide)
? Icon(
(this
.widget
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: animated_navigation_bar
description: A stylish and customizable bottom navigation bar with animations
version: 0.0.3
version: 0.0.3+1
author: Abdelmadjid Bouikken Bahi Amar <bouikkenmajid@gmail.com>
homepage: https://github.com/Majidbouikken/AnimatedNavigationBar

Expand Down

0 comments on commit d162451

Please sign in to comment.