Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.9"
version: "0.0.10"
stack_trace:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/ss_bottom_navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class _BottomNavBarState extends State<BottomNavBar> {

@override
Widget build(BuildContext context) {
_service = Provider.of<Service>(context, listen: false);
_service = Provider.of<Service>(context, );
var size = MediaQuery.of(context).padding;

if (_service.items.isEmpty) {
Expand Down
7 changes: 4 additions & 3 deletions lib/views/nav_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class _NavItemState extends State<NavItem> with TickerProviderStateMixin {
var _index = service.items.indexOf(widget.ssBottomNavItem);
var _selected = _index == service.selected;
var _key = service.keys[_index];
var size = MediaQuery.of(context).size;

var _textStyle = widget.ssBottomNavItem.textStyle ?? TextStyle(fontSize: 14);

Expand Down Expand Up @@ -63,15 +64,15 @@ class _NavItemState extends State<NavItem> with TickerProviderStateMixin {
duration: service.animationDuration,
curve: Curves.easeOutExpo,
child: Container(
margin: EdgeInsets.all(8),
margin: EdgeInsets.all(size.height*0.01),
key: _key,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
widget.ssBottomNavItem.iconData,
color: _isActive ? service.settings.selectedColor : service.settings.unselectedColor,
size: widget.ssBottomNavItem.iconSize ?? service.settings.iconSize ?? 16,
size: widget.ssBottomNavItem.iconSize ?? service.settings.iconSize ?? 4,
),
AnimatedSize(
curve: Curves.easeOutExpo,
Expand All @@ -83,7 +84,7 @@ class _NavItemState extends State<NavItem> with TickerProviderStateMixin {
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 5,
width: size.width*0.02,
),
Text(
widget.ssBottomNavItem.text,
Expand Down