更新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_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<MyHomePage> {
@override
void initState() {
super.initState();
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith(
statusBarColor: Colors.transparent,
));
}
@override
Widget build(BuildContext context) {
return ASScaffold(

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

Loading…
Cancel
Save