Issue
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
Solution
Please share some code. I tried adding SystemChrome.setEnabledSystemUIOverlays([]);
in initState()
and I have a text field, It is working fine.
Answered By - Keerti Purswani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.