|
|
@ -30,6 +30,9 @@ class ASScaffold extends StatefulWidget {
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// 右方向的抽屉
|
|
|
|
/// 右方向的抽屉
|
|
|
|
final Widget endDrawer;
|
|
|
|
final Widget endDrawer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// `AppBar` appBar
|
|
|
|
|
|
|
|
final Widget appBar;
|
|
|
|
ASScaffold({
|
|
|
|
ASScaffold({
|
|
|
|
Key key,
|
|
|
|
Key key,
|
|
|
|
@required this.title,
|
|
|
|
@required this.title,
|
|
|
@ -38,6 +41,7 @@ class ASScaffold extends StatefulWidget {
|
|
|
|
this.bottomNavigationBar,
|
|
|
|
this.bottomNavigationBar,
|
|
|
|
this.appBarBottom,
|
|
|
|
this.appBarBottom,
|
|
|
|
this.endDrawer,
|
|
|
|
this.endDrawer,
|
|
|
|
|
|
|
|
this.appBar,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -51,22 +55,23 @@ class _ASScaffoldState extends State<ASScaffold> {
|
|
|
|
endDrawer: widget.endDrawer,
|
|
|
|
endDrawer: widget.endDrawer,
|
|
|
|
backgroundColor: kBackgroundColor,
|
|
|
|
backgroundColor: kBackgroundColor,
|
|
|
|
bottomNavigationBar: widget.bottomNavigationBar,
|
|
|
|
bottomNavigationBar: widget.bottomNavigationBar,
|
|
|
|
appBar: AppBar(
|
|
|
|
appBar: widget.appBar ??
|
|
|
|
brightness: Brightness.light,
|
|
|
|
AppBar(
|
|
|
|
backgroundColor: kForegroundColor,
|
|
|
|
brightness: Brightness.light,
|
|
|
|
elevation: 0,
|
|
|
|
backgroundColor: kForegroundColor,
|
|
|
|
leading: widget.leading ?? ASBackButton(),
|
|
|
|
elevation: 0,
|
|
|
|
centerTitle: true,
|
|
|
|
leading: widget.leading ?? ASBackButton(),
|
|
|
|
title: DefaultTextStyle(
|
|
|
|
centerTitle: true,
|
|
|
|
style: TextStyle(
|
|
|
|
title: DefaultTextStyle(
|
|
|
|
color: kTextColor,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 18.sp,
|
|
|
|
color: kTextColor,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 18.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: widget.title is String ? Text(widget.title) : widget.title,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
bottom: widget.appBarBottom,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: widget.title is String ? Text(widget.title) : widget.title,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
bottom: widget.appBarBottom,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
body: widget.body,
|
|
|
|
body: widget.body,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|