scaffold add appBar
null_safety
小赖 4 years ago
parent 8a46810b45
commit 8d08e187e8

@ -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,7 +55,8 @@ 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 ??
AppBar(
brightness: Brightness.light, brightness: Brightness.light,
backgroundColor: kForegroundColor, backgroundColor: kForegroundColor,
elevation: 0, elevation: 0,

@ -1,6 +1,6 @@
name: ansu_ui name: ansu_ui
description: A new Flutter package. description: A new Flutter package.
version: 0.0.2 version: 0.0.3
author: author:
environment: environment:

Loading…
Cancel
Save