Repository navigation
A bug about statusbar‘s height in the multi window on Xiaomi phone #132831
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuese: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
on Xiaomi Phone
1.change from full screen to multi screen
Expected results
statusbar’s height is not 0
on Xiaomi phone,when app in multi window,the captionBar.top is not 0 and statusbar.top is 0,but FlutterView only used statusBar,this may cause bugs!
from full screen to multi screen

Actual results
statusbar’s height is 0,the line in statusbar shade appbar
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: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
appBarTheme: const AppBarTheme(
centerTitle: true
)
),
home: const MyHomePage(title: 'Flutter示例'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
device-2023-08-18-155512.mp4
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[!] Flutter (Channel stable, 3.10.6, on macOS 12.6.1 21G217 darwin-arm64, locale zh-Hans-CN)
• Flutter version 3.10.6 on channel stable at /Users/bin_ren/.fvm/versions/3.10.6
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.19.1/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/bin_ren/.fvm/versions/3.10.6. Consider adding /Users/bin_ren/.fvm/versions/3.10.6/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f468f3366c (5 weeks ago), 2023-07-12 15:19:05 -0700
• Engine revision cdbeda788a
• Dart version 3.0.6
• DevTools version 2.23.1
• Flutter download mirror https://storage.flutter-io.cn
• 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 33.0.2)
• Android SDK at /Users/bin_ren/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_HOME = /Users/bin_ren/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14B47b
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• 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 11.0.13+0-b1751.21-8125866)
[✓] IntelliJ IDEA Community Edition (version 2022.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.80.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.70.0
[✓] Connected device (3 available)
• M2101K9C (mobile) • a0f0e393 • android-arm64 • Android 13 (API 33)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.6.1 21G217 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 115.0.5790.170Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuese: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
AWarmHug commentedon Aug 18, 2023
huycozy commentedon Aug 21, 2023
Hi @AWarmHug
I don't have a Xiaomi phone but a Realme one (Realme 6, Android 11). It displays as expected in
Floating windowmode:Demo
I wonder if the
multiple windowmode on Xiaomi is similar toFloating windowmode in Realme?Also, can you share the device info (OS, model)? And please confirm this on the latest Flutter master channel as well. Thanks!
AWarmHug commentedon Aug 21, 2023
Yes!,is Floating window,I tested other phones and they all displayed as expected.
device info:

huycozy commentedon Aug 22, 2023
Thanks for the information. Unfortunately, I don't have such a device to check this. Labeling the issue as a device-specific issue.
17 remaining items
flutter-triage-bot commentedon Nov 8, 2024
This issue was assigned to @yaakovschectman but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
gmackall commentedon Nov 12, 2024
From Android triage:
go/android_insiders_25_notes
We believe this would be fixed by changing from using
https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()
to using
https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()
Fixed XiaoMi statusBar Bug (#161271)
Fixed XiaoMi statusBar Bug (flutter#161271)
github-actions commentedon Jan 29, 2025
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
flutter doctor -vand a minimal reproduction of the issue.