hawkkiller
@hawkkiller
Dart, Flutter, JS/TS, React Native, Vue3, NEST.JS,

Как удалить status bar (flutter)?

Как мне удалить status bar во флаттере? SystemChrome.setEnabledSystemUIOverlays([]); убирает его, но оставляет чёрный фон, что мне не нужно, выглядит примерно так:
5ffda27dc848e883936123.png
Я хочу, чтобы то место, которое у меня сейчас чёрное было такого же цвета. Код :

class _MyHomePageState extends State {
@override
void initState() {
super.initState();
SystemChrome.setEnabledSystemUIOverlays([]);
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: Center(
child: Container(
height: 6000,
width: 10000,
decoration: BoxDecoration(
gradient: LinearGradient(
end: Alignment.bottomRight,
begin: Alignment.topLeft,
colors: [Colors.red, Colors.purple]),
),
child: Column(
children: [
Container(
margin: EdgeInsets.all(30),
height: 160,
width: 160,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(15)),
color: Color(0xff1B1C22),
),
child: StreamBuilder(
stream: Stream.periodic(const Duration(seconds: 1)),
builder: (context, snapshot) {
return Center(
child: Text(
DateFormat('hh:mm').format(DateTime.now()),
style: TextStyle(fontSize: 40, color: Colors.white),
));
})),
],
),
)));
}
  • Вопрос задан
  • 183 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы