flutter android端沉浸式状态栏和iOS改app名字

android端设置沉浸式状态栏

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

void main(){
  runApp(MyApp());
  if (Platform.isAndroid) {
    // 以下两行 设置android状态栏为透明的沉浸。写在组件渲染之后,是为了在渲染后进行set赋值,覆盖状态栏,写在渲染之前MaterialApp组件会覆盖掉这个值。
    SystemUiOverlayStyle systemUiOverlayStyle =
    SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}

iOS端修改app项目名称

ios/Info.plist中

<key>CFBundleName</key>
	<string>快哉小课</string>
发布了316 篇原创文章 · 获赞 63 · 访问量 37万+

猜你喜欢

转载自blog.csdn.net/ytfunnysite/article/details/104023629