Skip to content

Commit

Permalink
Fix styles icon placement
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3rndt committed Mar 4, 2024
1 parent 8749271 commit a7d0f9b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
3 changes: 3 additions & 0 deletions example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Unreleased
### Fixed
- Icon widget in prebuilt styles placed wronlgy
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion lib/styles/style_1_bottom_navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Style1BottomNavBar extends StatelessWidget {
),
if (item.title != null)
Padding(
padding: const EdgeInsets.only(top: 15),
padding: const EdgeInsets.only(top: 4),
child: Material(
type: MaterialType.transparency,
child: FittedBox(
Expand Down
16 changes: 9 additions & 7 deletions lib/styles/style_3_bottom_navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ class Style3BottomNavBar extends StatelessWidget {
Widget _buildItem(ItemConfig item, bool isSelected) => Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconTheme(
data: IconThemeData(
size: item.iconSize,
color: isSelected
? item.activeColorPrimary
: item.inactiveColorPrimary,
Flexible(
child: IconTheme(
data: IconThemeData(
size: item.iconSize,
color: isSelected
? item.activeColorPrimary
: item.inactiveColorPrimary,
),
child: isSelected ? item.icon : item.inactiveIcon,
),
child: isSelected ? item.icon : item.inactiveIcon,
),
if (item.title != null)
FittedBox(
Expand Down
16 changes: 9 additions & 7 deletions lib/styles/style_6_bottom_navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ class _Style6BottomNavBarState extends State<Style6BottomNavBar>
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
IconTheme(
data: IconThemeData(
size: item.iconSize,
color: isSelected
? item.activeColorPrimary
: item.inactiveColorPrimary,
Flexible(
child: IconTheme(
data: IconThemeData(
size: item.iconSize,
color: isSelected
? item.activeColorPrimary
: item.inactiveColorPrimary,
),
child: isSelected ? item.icon : item.inactiveIcon,
),
child: isSelected ? item.icon : item.inactiveIcon,
),
if (item.title != null)
FittedBox(
Expand Down

0 comments on commit a7d0f9b

Please sign in to comment.