Android Keyboard causes Status Bar to reappear
1,004
Please share some code. I tried adding SystemChrome.setEnabledSystemUIOverlays([]);
in initState()
and I have a text field, It is working fine.
Author by
Admin
Updated on December 09, 2022Comments
-
Admin over 1 year
I need to hide the Android Status bar in my app so i am using the following code
import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; main() { SystemChrome.setEnabledSystemUIOverlays([]); runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center(child: TextField()), backgroundColor: Colors.orange)); } }
I have a
textfield
in the screen so whenever the Android Keyboard opens the status bar reappears. I have tried with multiple Android devices and i am getting the same bug.Is this really a bug in the framework or am i doing something wrong?
I have attached a short video link below to show the bug
https://drive.google.com/file/d/19qs5Rsrfc_G1oN5kbxgKvYQAXpTr8RZx/view?usp=sharing
I have not tested in
iOS
-
Admin over 5 yearsI have added code in the question, please have a look
-
Admin over 5 yearsCheck on a real device
-
Keerti Purswani over 5 yearsChecked your code on real device. Working fine for me. Sharing video to show
-
Keerti Purswani over 5 years
-
Admin over 5 yearswhich device are you using and android version. I am using Redmi with Android Marshmallow
-
Keerti Purswani over 5 yearsI am using MiA1 - Android Version 9. You said you tried on multiple devices right? Which ones?
-
Admin over 5 yearsI also tried on Redmi - Lollipop, Coolpad - Marshmallow
-
Admin over 5 yearsI guess then the issue is because of Android's Fragmentation