diff --git a/packages/flutter_adaptive_scaffold/AUTHORS b/packages/flutter_adaptive_scaffold/AUTHORS index 8c0344813dc1..0bbdf210f3c2 100644 --- a/packages/flutter_adaptive_scaffold/AUTHORS +++ b/packages/flutter_adaptive_scaffold/AUTHORS @@ -3,4 +3,5 @@ # # Name/Organization -Google Inc. \ No newline at end of file +Google Inc. +Jason C.H \ No newline at end of file diff --git a/packages/flutter_adaptive_scaffold/CHANGELOG.md b/packages/flutter_adaptive_scaffold/CHANGELOG.md index 3020107b0a0a..720e6c113fd2 100644 --- a/packages/flutter_adaptive_scaffold/CHANGELOG.md +++ b/packages/flutter_adaptive_scaffold/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 0.1.7 +* Fix top padding for NavigationBar. * Updates minimum supported SDK version to Flutter 3.7/Dart 2.19. ## 0.1.6 @@ -15,7 +16,7 @@ ## 0.1.4 * Use Material 3 NavigationBar instead of BottomNavigationBar - + ## 0.1.3 * Fixes `groupAlignment` property not available in `standardNavigationRail` - [flutter/flutter#121994](https://github.com/flutter/flutter/issues/121994) diff --git a/packages/flutter_adaptive_scaffold/lib/src/adaptive_scaffold.dart b/packages/flutter_adaptive_scaffold/lib/src/adaptive_scaffold.dart index 55b77f8152b0..3f2a030436b2 100644 --- a/packages/flutter_adaptive_scaffold/lib/src/adaptive_scaffold.dart +++ b/packages/flutter_adaptive_scaffold/lib/src/adaptive_scaffold.dart @@ -328,20 +328,25 @@ class AdaptiveScaffold extends StatefulWidget { final NavigationBarThemeData currentNavBarTheme = NavigationBarTheme.of(context); return NavigationBarTheme( - data: currentNavBarTheme.copyWith( - iconTheme: MaterialStateProperty.resolveWith( - (Set states) { + data: currentNavBarTheme.copyWith( + iconTheme: MaterialStateProperty.resolveWith( + (Set states) { return currentNavBarTheme.iconTheme ?.resolve(states) ?.copyWith(size: iconSize) ?? IconTheme.of(context).copyWith(size: iconSize); - }), + }, ), + ), + child: MediaQuery( + data: MediaQuery.of(context).removePadding(removeTop: true), child: NavigationBar( selectedIndex: currentIndex ?? 0, destinations: destinations, onDestinationSelected: onDestinationSelected, - )); + ), + ), + ); }, ); } diff --git a/packages/flutter_adaptive_scaffold/pubspec.yaml b/packages/flutter_adaptive_scaffold/pubspec.yaml index 809150415d70..7c43d142517a 100644 --- a/packages/flutter_adaptive_scaffold/pubspec.yaml +++ b/packages/flutter_adaptive_scaffold/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_adaptive_scaffold description: Widgets to easily build adaptive layouts, including navigation elements. -version: 0.1.6 +version: 0.1.7 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_adaptive_scaffold%22 repository: https://github.com/flutter/packages/tree/main/packages/flutter_adaptive_scaffold diff --git a/packages/flutter_adaptive_scaffold/test/simulated_layout.dart b/packages/flutter_adaptive_scaffold/test/simulated_layout.dart index 46a8f8f6e5cc..c0de35d904c9 100644 --- a/packages/flutter_adaptive_scaffold/test/simulated_layout.dart +++ b/packages/flutter_adaptive_scaffold/test/simulated_layout.dart @@ -136,7 +136,10 @@ enum SimulatedLayout { ), ), home: MediaQuery( - data: MediaQueryData(size: size), + data: MediaQueryData( + size: size, + padding: const EdgeInsets.only(top: 30), + ), child: TestScaffold( initialIndex: initialIndex, isAnimated: animations,