更新appBar brightness

statusBarColor
null_safety
小赖 4 years ago
parent 03c40abaa6
commit 400e8c02ca

@ -4,6 +4,7 @@ import 'package:example/example_dialog.dart';
import 'package:example/example_drawer.dart'; import 'package:example/example_drawer.dart';
import 'package:example/example_tag.dart'; import 'package:example/example_tag.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -53,6 +54,14 @@ class MyHomePage extends StatefulWidget {
} }
class _MyHomePageState extends State<MyHomePage> { class _MyHomePageState extends State<MyHomePage> {
@override
void initState() {
super.initState();
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith(
statusBarColor: Colors.transparent,
));
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ASScaffold( return ASScaffold(

@ -52,6 +52,7 @@ class _ASScaffoldState extends State<ASScaffold> {
backgroundColor: kBackgroundColor, backgroundColor: kBackgroundColor,
bottomNavigationBar: widget.bottomNavigationBar, bottomNavigationBar: widget.bottomNavigationBar,
appBar: AppBar( appBar: AppBar(
brightness: Brightness.light,
backgroundColor: kForegroundColor, backgroundColor: kForegroundColor,
elevation: 0, elevation: 0,
leading: widget.leading ?? ASBackButton(), leading: widget.leading ?? ASBackButton(),

Loading…
Cancel
Save