flutter android沉浸式状态栏

 

import package:flutter/services.dart;
import dart:io;

 

class _MyAppState extends State<MyApp> {
  //android 沉浸式
  @override
  Widget build(BuildContext context) {
    if (Platform.isAndroid) {
      SystemUiOverlayStyle systemUiOverlayStyle =
          SystemUiOverlayStyle(statusBarColor: Colors.transparent);
      SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
    }
    //
    return MaterialApp(
      home: Demo(),
    );
  }
}

 

flutter android沉浸式状态栏

上一篇:配置python环境变量(转)


下一篇:VC++ CopyFile函数使用方法