0

I have this empty page :

import 'package:flutter/material.dart';

class MyOrdersClass extends StatefulWidget {
  @override
  _MyOrdersClassState createState() => _MyOrdersClassState();
}

class _MyOrdersClassState extends State<MyOrdersClass> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: Text(
          'My Orders',
          style: TextStyle(
            color: Colors.red,
          ),
        ),
      ),
      body: Container(),
    );
  }
}

and this is the result : enter image description here

I can display it but it doesn't appear in page

How to fix it?

Laila Mattar
  • 271
  • 1
  • 9

1 Answers1

0

Status bar still exist in your case, it is just showing the white text color and your background is white too, so you can't see them, use this to change color of your status bar or text:

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark.copyWith(
   statusBarColor: Colors.white, // Color for Android
   statusBarBrightness: Brightness.dark // Dark == white status bar -- for IOS.
));
Jim Chiu
  • 2,908
  • 1
  • 3
  • 12