fix appBar height

null_safety
小赖 5 years ago
parent d52ac279c3
commit 1d5c169e43

@ -11,7 +11,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
///
///`title`,`body`,`leading`,`bottomNavigationBar`,`appBarBottom`,`appBar`
///
///title AppBar `null`scaffoldAppBar
///title , AppBar AppBarBottom `null`scaffoldAppBar
///
///AppBarBottomAppBarBottom
class ASScaffold extends StatefulWidget {
///`String``Text`
final dynamic title;
@ -57,13 +59,18 @@ class _ASScaffoldState extends State<ASScaffold> {
endDrawer: widget.endDrawer,
backgroundColor: kBackgroundColor,
bottomNavigationBar: widget.bottomNavigationBar,
appBar: widget.title == null && widget.appBar == null
appBar: widget.title == null &&
widget.appBar == null &&
widget.appBarBottom == null
? null
: widget.appBar ??
AppBar(
brightness: Brightness.light,
backgroundColor: kForegroundColor,
elevation: 0,
toolbarHeight: widget.title == null && widget.appBar == null
? widget.appBarBottom.preferredSize.height + 2.0
: null,
leading: widget.leading ?? ASBackButton(),
centerTitle: true,
title: DefaultTextStyle(

Loading…
Cancel
Save