-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flutter_adaptive_scaffold] : Bottom Navigation bar height is too much in Flutter 3.10.1 #127088
Comments
Thank you for the report. This issue seems to be introduced on And this issue doesn't occur in the previous version Labeling the issue for further investigation. flutter doctor -v (stable and master)[✓] Flutter (Channel stable, 3.10.1, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
• Flutter version 3.10.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d3d8effc68 (26 hours ago), 2023-05-16 17:59:05 -0700
• Engine revision b4fb11214d
• Dart version 3.0.1
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 32.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.64.0
[✓] Connected device (3 available)
• RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126
[✓] Network resources
• All expected network resources are available.
• No issues found! [!] Flutter (Channel master, 3.11.0-6.0.pre.134, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
• Flutter version 3.11.0-6.0.pre.134 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f31dae2a80 (3 hours ago), 2023-05-17 17:18:51 -0700
• Engine revision d970370779
• Dart version 3.1.0 (build 3.1.0-118.0.dev)
• DevTools version 2.23.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 32.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.64.0
[✓] Connected device (3 available)
• RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category. |
it only happens on iOS and Android, Web is fine. there is a padding added, somewhere from SlotLayout. I think it have something todo with the animation. |
@fmt-Println-MKO : Seems like in SlotLayout, there is no change since 2022-August. So need to check the root cause of this issue. Also as you said, it is working fine in web, I checked that as well. |
@aliasgar4558 Yes, I just checked the NavigationBar without SlotLayout and there it's fine, no padding. |
@heralight, I faced this one in latest package version. Flutter sdk version won't matter, like if you are on 3.7 and try same thing with latest package version, then also it will be reproduced. |
I am running into this problem as well, I created a new Flutter project and installed flutter_adaptive_scaffold, and the padding problem was no longer there. |
so you have that problem with an existing app, but not with a new one? |
@JonasESmith : Can you please verify if you are on latest version of the package in both, pubspec.yaml and pubspec.lock..? |
I was incorrect after getting the correct version the padding is still there on a new project. Sorry. |
Yeah, no problem mate @JonasESmith |
|
I have also noticed there is an issue with the top navigation padding as well |
It is worth noting that I'm only seeing this on ios |
it is also on Android. |
@fmt-Println-MKO : Is it working fine now? |
@aliasgar4558 no, I haven't had time for further investigation. Just found the same place that might cause the issue as you. |
Does adding MediaQuery.removePadding make sense in adaptive_scaffold.dart for the bottomNavigation in Scaffold?
|
@sunndog but it is working fine in case of web, if we minimize the web size to something as mobile, so I am not sure if this would be an ideal solution in adaptive scaffold?? Let's see what other members suggest 🙌🏼 |
I am also affected by this issue, Also This is a bug in NavigationBar and not in adaptive_scaffold. Here is a simple reproducible code when a NavigationBar is placed in a stack. code sampleimport 'package:flutter/material.dart';
/// Flutter code sample for [NavigationBar].
void main() => runApp(const NavigationBarApp());
class NavigationBarApp extends StatelessWidget {
const NavigationBarApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(home: NavigationExample());
}
}
class NavigationExample extends StatefulWidget {
const NavigationExample({super.key});
@override
State<NavigationExample> createState() => _NavigationExampleState();
}
class _NavigationExampleState extends State<NavigationExample> {
int currentPageIndex = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(children: <Widget>[
Container(
color: Colors.red,
alignment: Alignment.center,
child: const Text('Page 1'),
),
Container(
color: Colors.green,
alignment: Alignment.center,
child: const Text('Page 2'),
),
Container(
color: Colors.blue,
alignment: Alignment.center,
child: const Text('Page 3'),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: NavigationBar(
onDestinationSelected: (int index) {
setState(() {
currentPageIndex = index;
});
},
selectedIndex: currentPageIndex,
destinations: const <Widget>[
NavigationDestination(
icon: Icon(Icons.explore),
label: 'Explore',
),
NavigationDestination(
icon: Icon(Icons.commute),
label: 'Commute',
),
NavigationDestination(
selectedIcon: Icon(Icons.bookmark),
icon: Icon(Icons.bookmark_border),
label: 'Saved',
),
],
),
)
]),
);
}
}
Adding back the labels since it is also affecting the package. cc: @stuartmorgan |
Not a problem on Windows, but a pretty big one on ios. The worst part about it how difficult a workaround is to fix it. Im gonna have to use a stack instead of relying on the scaffold and why? Just let us specify the padding. |
Any fix on the same ?? |
For the time being I am just using something like bellow so that it functions at all.
|
I also have this issue - I didn't notice as I've been building for mac and didn't have the issue. Then I previewed in iOS and noticed it right away. |
This pr removes the top padding in `MediaQuery` for NavigationBar to fix unexpected padding. The `Scaffold` in flutter framework actually did this but this package didn't. Fix flutter/flutter#127088
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there an existing issue for this?
Steps to reproduce
Expected results
Actual results
Code sample
Code sample
NO code changes made.
Screenshots or Video
Screenshot for issue
Logs
Logs
No crash logs, but able to reproduce with Flutter version 3.10.1
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: