From 400e8c02ca7597e25b2a569028e77f4bb6bec289 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 25 Nov 2020 13:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0appBar=20brightness=20statusB?= =?UTF-8?q?arColor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/main.dart | 9 +++++++++ lib/scaffold/as_scaffold.dart | 1 + 2 files changed, 10 insertions(+) diff --git a/example/lib/main.dart b/example/lib/main.dart index 9225b9e..5979836 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -4,6 +4,7 @@ import 'package:example/example_dialog.dart'; import 'package:example/example_drawer.dart'; import 'package:example/example_tag.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:get/get.dart'; @@ -53,6 +54,14 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { + @override + void initState() { + super.initState(); + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith( + statusBarColor: Colors.transparent, + )); + } + @override Widget build(BuildContext context) { return ASScaffold( diff --git a/lib/scaffold/as_scaffold.dart b/lib/scaffold/as_scaffold.dart index d39f659..ed87b62 100644 --- a/lib/scaffold/as_scaffold.dart +++ b/lib/scaffold/as_scaffold.dart @@ -52,6 +52,7 @@ class _ASScaffoldState extends State { backgroundColor: kBackgroundColor, bottomNavigationBar: widget.bottomNavigationBar, appBar: AppBar( + brightness: Brightness.light, backgroundColor: kForegroundColor, elevation: 0, leading: widget.leading ?? ASBackButton(),