美文网首页Flutter
Flutter Status Bar 文字颜色

Flutter Status Bar 文字颜色

作者: MaxLeeXYZ | 来源:发表于2019-08-15 09:30 被阅读0次

使用

Scaffold(
        body: AnnotatedRegion<SystemUiOverlayStyle>(
          value: SystemUiOverlayStyle.dark, // 深色、浅色
          child: null,
        ));

相关源码

SystemUiOverlayStyle

 /// System overlays should be drawn with a light color. Intended for
  /// applications with a dark background.
  static const SystemUiOverlayStyle light = SystemUiOverlayStyle(
    systemNavigationBarColor: Color(0xFF000000),
    systemNavigationBarDividerColor: null,
    statusBarColor: null,
    systemNavigationBarIconBrightness: Brightness.light,
    statusBarIconBrightness: Brightness.light,
    statusBarBrightness: Brightness.dark,
  );

  /// System overlays should be drawn with a dark color. Intended for
  /// applications with a light background.
  static const SystemUiOverlayStyle dark = SystemUiOverlayStyle(
    systemNavigationBarColor: Color(0xFF000000),
    systemNavigationBarDividerColor: null,
    statusBarColor: null,
    systemNavigationBarIconBrightness: Brightness.light,
    statusBarIconBrightness: Brightness.dark,
    statusBarBrightness: Brightness.light,
  );

相关文章

网友评论

    本文标题:Flutter Status Bar 文字颜色

    本文链接:https://www.haomeiwen.com/subject/bbdajctx.html