Make flutter application fullscreen

前端 未结 7 1489
忘了有多久
忘了有多久 2020-12-25 10:05

How can I make a flutter application fullscreen. I already found out how to hide the status bar Hide Android Status Bar On Flutter App. but I can\'t seem to find how to hide

7条回答
  •  离开以前
    2020-12-25 10:27

    Below code is working perfect for fullscreen

    SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
    
    import 'package:flutter/services.dart'; 
    ////
    
    @override
    Widget build(BuildContext context) {
    ///Set color status bar
     SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
       return Scaffold(
       backgroundColor: Colors.white,
       body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Image.asset(
              'images/ic_splash_logo.png',
              width: 97.0,
              height: 115.0,
              fit: BoxFit.contain,
            ),
            SizedBox(
              height: 10.0,
            ),
            Text(
              'iComplain',
              style: TextStyle(fontSize: 24,
                  color: Color(0xFF174D73),
                fontFamily: 'Helvetica'
              ),
            ),
          ],
         ),
        ),
      );
    }
    

提交回复
热议问题