Skip to content

Commit

Permalink
Merge pull request #39 from MarsadMaqsood/beta-1.1.1-1
Browse files Browse the repository at this point in the history
1.1.1-Beta-1
  • Loading branch information
MarsadMaqsood authored Oct 15, 2024
2 parents 13e3e33 + 5434ffe commit 5cf741e
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 60 deletions.
2 changes: 1 addition & 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
stylish_bottom_bar: ^1.1.1-beta-1

## ⚡ Import

Expand Down
44 changes: 21 additions & 23 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class MyApp extends StatelessWidget {
// useMaterial3: true,
primarySwatch: Colors.green,
),
home: const BubbelBarExample(),
// home: const AnimatedBarExample(),
// home: const BubbelBarExample(),
home: const AnimatedBarExample(),
);
}
}
Expand Down Expand Up @@ -51,31 +51,29 @@ class _AnimatedBarExampleState extends State<AnimatedBarExample> {
// resizeToAvoidBottomInset: false,

bottomNavigationBar: StylishBottomBar(
// option: AnimatedBarOptions(
// // iconSize: 32,
// barAnimation: BarAnimation.blink,
// iconStyle: IconStyle.animated,
option: AnimatedBarOptions(
// iconSize: 32,
barAnimation: BarAnimation.drop,
iconStyle: IconStyle.animated,

// // opacity: 0.3,
// ),
option: DotBarOptions(
dotStyle: DotStyle.tile,
gradient: const LinearGradient(
colors: [
Colors.deepPurple,
Colors.pink,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
// opacity: 0.3,
),
// option: DotBarOptions(
// dotStyle: DotStyle.tile,
// gradient: const LinearGradient(
// colors: [
// Colors.deepPurple,
// Colors.pink,
// ],
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// ),
// ),
items: [
BottomBarItem(
icon: const Icon(
Icons.house_outlined,
),
selectedIcon: const Icon(Icons.house_rounded),
selectedColor: Colors.teal,
icon: const Icon(Icons.house_outlined),
selectedIcon: const Icon(Icons.abc),
selectedColor: Colors.red,
unSelectedColor: Colors.grey,
title: const Text('Home'),
badge: const Text('9+'),
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ dependencies:
stylish_bottom_bar:
path: ../

cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.8

dev_dependencies:
flutter_lints: ^2.0.1
flutter_lints: ^5.0.0
flutter_test:
sdk: flutter

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 @@ -17,7 +17,7 @@ class BottomBarItem {
});

///Use this to add item icon
final Widget? icon;
final Widget icon;

///Use this to change the selected item icon
final Widget? selectedIcon;
Expand Down
30 changes: 13 additions & 17 deletions lib/src/anim_nav/animated_nav_tiles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ class AnimatedNavigationTiles extends StatelessWidget {
size: iconSize,
// size: selected ? iconSize + 4 : iconSize,
),
child: selected && items.selectedIcon != null
? items.selectedIcon!
: items.icon!,
child: selected ? items.selectedIcon ?? items.icon : items.icon,
),
),
),
Expand Down Expand Up @@ -159,9 +157,7 @@ class AnimatedNavigationTiles extends StatelessWidget {
color: itemColor,
size: iconSize,
),
child: selected && items.selectedIcon != null
? items.selectedIcon!
: items.icon!,
child: selected ? items.selectedIcon ?? items.icon : items.icon,
),
),
duration: const Duration(milliseconds: 600),
Expand Down Expand Up @@ -246,9 +242,9 @@ class AnimatedNavigationTiles extends StatelessWidget {
color: itemColor,
size: selected ? iconSize + 4 : iconSize,
),
child: selected && items.selectedIcon != null
? items.selectedIcon!
: items.icon!,
child: selected
? items.selectedIcon ?? items.icon
: items.icon,
),
),
),
Expand All @@ -271,9 +267,10 @@ class AnimatedNavigationTiles extends StatelessWidget {
color: itemColor,
size: iconSize,
),
child: selected && items.selectedIcon != null
? items.selectedIcon!
: items.icon!,
// child: selected && items.selectedIcon != null
// ? items.selectedIcon!
// : items.icon,
child: selected ? items.selectedIcon ?? items.icon : items.icon,
),
),
secondChild: Align(
Expand All @@ -292,7 +289,7 @@ class AnimatedNavigationTiles extends StatelessWidget {
),
child: selected && items.selectedIcon != null
? items.selectedIcon!
: items.icon!,
: items.icon,
),
),
),
Expand Down Expand Up @@ -450,13 +447,12 @@ class _IconWidgetState extends State<IconWidget>
? widget.barAnimation == BarAnimation.transform3D
? Transform(
transform: Matrix4.identity()
// ..setEntry(2, 3, 0.003)
..setEntry(3, 0, 0.002)
..rotateY(0), //..rotateY(0),
child: widget.item.icon!,
child: widget.item.selectedIcon ?? widget.item.icon,
)
: widget.item.icon!
: widget.item.icon!,
: widget.item.selectedIcon ?? widget.item.icon
: widget.item.icon,
);
}
}
20 changes: 13 additions & 7 deletions lib/src/bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,24 @@ class _StylishBottomBarState extends State<StylishBottomBar>
geometry: _geometryListenable!,
notchMargin: isUsingMaterial3 ? 6 : 8,
),
child: innerWidget(
context,
additionalBottomPadding,
widget.fabLocation,
listWidget,
options is AnimatedBarOptions ? options.barAnimation : null,
child: Container(
decoration: BoxDecoration(
borderRadius: widget.borderRadius,
gradient: widget.gradient,
color: widget.backgroundColor ?? Colors.white,
),
child: innerWidget(
context,
additionalBottomPadding,
widget.fabLocation,
listWidget,
options is AnimatedBarOptions ? options.barAnimation : null,
),
),
),
)
: Material(
elevation: widget.elevation,
// color: widget.backgroundColor ?? Colors.white,
borderRadius: widget.borderRadius,
child: Container(
decoration: BoxDecoration(
Expand Down
3 changes: 1 addition & 2 deletions lib/src/dot_nav/dot_nav_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class DotNavigationTiles extends StatelessWidget {
(selected ? item.selectedColor : item.unSelectedColor);
Color get itemColorOnSelected => item.backgroundColor ?? item.selectedColor;

Widget get iconChild =>
selected && item.selectedIcon != null ? item.selectedIcon! : item.icon!;
Widget get iconChild => selected ? item.selectedIcon ?? item.icon : item.icon;

List<Widget> _dotItems() {
final label = LabelWidget(
Expand Down
6 changes: 1 addition & 5 deletions lib/src/widgets/icon_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ class IconWidget extends StatelessWidget {
child: Padding(
padding:
item.showBadge ? const EdgeInsets.all(8.0) : EdgeInsets.zero,
child: selected
? item.selectedIcon != null
? item.selectedIcon!
: item.icon!
: item.icon!,
child: selected ? item.selectedIcon ?? item.icon : item.icon,
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions 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
version: 1.1.1-beta-1
#homepage: https://github.com/MarsadMaqsood/Stylish_bottom_bar
repository: https://github.com/MarsadMaqsood/Stylish_bottom_bar

Expand All @@ -13,7 +13,7 @@ dependencies:
sdk: flutter

dev_dependencies:
flutter_lints: ^3.0.1
flutter_lints: ^5.0.0

flutter_test:
sdk: flutter

0 comments on commit 5cf741e

Please sign in to comment.