From ecd66ed121be317afcbaebd99b596c0bcb1c3cbf Mon Sep 17 00:00:00 2001 From: laiiihz Date: Mon, 23 Nov 2020 17:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90scaffold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/scaffold/as_scaffold.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/scaffold/as_scaffold.dart b/lib/scaffold/as_scaffold.dart index 96610f8..9c59ca2 100644 --- a/lib/scaffold/as_scaffold.dart +++ b/lib/scaffold/as_scaffold.dart @@ -9,7 +9,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; /// ///`title`,`body` /// -///`leading` +///`leading`,`bottomNavigationBar`,`appBarBottom` class ASScaffold extends StatefulWidget { ///标题,可为`String`或`Text` final dynamic title; @@ -19,11 +19,19 @@ class ASScaffold extends StatefulWidget { /// `Scaffold` leading final Widget leading; + + /// `Scaffold` bottomNavigationBar + final Widget bottomNavigationBar; + + /// `AppBar` appBarBottom + final PreferredSizeWidget appBarBottom; ASScaffold({ Key key, @required this.title, this.leading, this.body, + this.bottomNavigationBar, + this.appBarBottom, }) : super(key: key); @override @@ -35,6 +43,7 @@ class _ASScaffoldState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: kBackgroundColor, + bottomNavigationBar: widget.bottomNavigationBar, appBar: AppBar( backgroundColor: kForegroundColor, elevation: 0, @@ -48,6 +57,7 @@ class _ASScaffoldState extends State { ), child: widget.title is String ? Text(widget.title) : widget.title, ), + bottom: widget.appBarBottom, ), body: widget.body, );