-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
- Run the attached minimal sample on any platform
- Tap an overflow icon button to reveal the overflow menu
- Rotate the screen from portrait to landscape or vice versa
Expected results
The overflow menu hides after rotation or recalculates its right position based on its anchor
Actual results
The overflow menu is still visible, but in the wrong position
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PopupMenuButton position',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePageView(),
);
}
}
class HomePageView extends StatefulWidget {
const HomePageView({super.key});
@override
State<HomePageView> createState() => _HomePageViewState();
}
class _HomePageViewState extends State<HomePageView> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('PopupMenuButton position')),
body: OrientationBuilder(builder: (context, orientation) {
int tileCount = orientation == Orientation.portrait ? 2 : 5;
return Padding(
padding: const EdgeInsets.all(8),
child: GridView.count(
crossAxisCount: tileCount,
crossAxisSpacing: 8,
mainAxisSpacing: 8,
childAspectRatio: 1,
children: List.generate(17, (index) {
return GridTile(
footer: GridTileBar(
title: Text(
'Item $index',
style: TextStyle(
color: Theme.of(context).colorScheme.onPrimaryContainer,
),
),
trailing: PopupMenuButton(
itemBuilder: (context) {
return [
const PopupMenuItem(
child: Text('Archive'),
),
const PopupMenuItem(
child: Text('Edit'),
),
const PopupMenuItem(
child: Text('Delete'),
)
];
},
),
),
child: Ink(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius: const BorderRadius.all(
Radius.circular(8),
),
),
width: 175,
height: 250,
),
);
}),
),
);
}),
);
}
}
Screenshots or Video
No response
Logs
Logs
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk...
D/FlutterFileDialogPlugin(24349): onAttachedToEngine - IN
D/FlutterFileDialogPlugin(24349): doOnAttachedToEngine - IN
D/FlutterFileDialogPlugin(24349): doOnAttachedToEngine - OUT
D/FlutterFileDialogPlugin(24349): onAttachedToEngine - OUT
D/FlutterFileDialogPlugin(24349): onAttachedToActivity
D/FlutterFileDialogPlugin(24349): doOnAttachedToActivity - IN
D/FlutterFileDialogPlugin(24349): doOnAttachedToActivity - OUT
Debug service listening on ws://127.0.0.1:56853/L-wxvMvU6kE=/ws
Syncing files to device Pixel Fold...
D/ProfileInstaller(24349): Installing profile for it.returntrue.novelist
D/VRI[MainActivity](24349): visibilityChanged oldVisibility=true newVisibility=false
I/ImeTracker(24349): it.returntrue.novelist:2c275c54: onRequestShow at ORIGIN_CLIENT reason SHOW_SOFT_INPUT fromUser false
D/InputMethodManager(24349): showSoftInput() view=io.flutter.embedding.android.FlutterView{113df2b VFE...... .F....ID 0,0-2208,1756 #1 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT
D/InputConnectionAdaptor(24349): The input method toggled cursor monitoring on
D/InsetsController(24349): show(ime(), fromIme=true)
W/InteractionJankMonitor(24349): Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=it.returntrue.novelist
I/ImeTracker(24349): it.returntrue.novelist:2c275c54: onShown
D/InputConnectionAdaptor(24349): The input method toggled cursor monitoring off
D/InsetsController(24349): hide(ime(), fromIme=true)
W/WindowOnBackDispatcher(24349): sendCancelIfRunning: isInProgress=falsecallback=ImeCallback=ImeOnBackInvokedCallback@70107678 Callback=android.window.IOnBackInvokedCallback$Stub$Proxy@935dc34
I/ImeTracker(24349): it.returntrue.novelist:42f354f: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED fromUser false
I/ImeTracker(24349): com.google.android.inputmethod.latin:8f8da5d4: onHidden
I/ImeTracker(24349): it.returntrue.novelist:d8a3be57: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
D/VRI[MainActivity](24349): visibilityChanged oldVisibility=true newVisibility=falseFlutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.22.3, on Microsoft Windows [Versione 10.0.19045.4651], locale it-IT)
• Flutter version 3.22.3 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b0850beeb2 (12 days ago), 2024-07-16 21:43:41 -0700
• Engine revision 235db911ba
• Dart version 3.4.4
• DevTools version 2.34.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\Alessandro\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.8.34408.163
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio
• 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
• android-studio-dir = C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
[√] VS Code (version 1.71.2)
• VS Code at C:\Users\Alessandro\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.48.0
[√] Connected device (4 available)
• Pixel Fold (mobile) • 35181FDHS00206 • android-arm64 • Android 14 (API 34)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versione 10.0.19045.4651]
• Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.185
• Edge (web) • edge • web-javascript • Microsoft Edge 127.0.2651.74
[√] Network resources
• All expected network resources are available.Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team