fix when title null

null_safety
小赖 4 years ago
parent 8d08e187e8
commit a9de4679f1

@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.2"
version: "0.0.3"
async:
dependency: transitive
description:

@ -35,7 +35,7 @@ class ASScaffold extends StatefulWidget {
final Widget appBar;
ASScaffold({
Key key,
@required this.title,
this.title,
this.leading,
this.body,
this.bottomNavigationBar,
@ -68,7 +68,9 @@ class _ASScaffoldState extends State<ASScaffold> {
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
child: widget.title is String ? Text(widget.title) : widget.title,
child: widget.title is String
? Text(widget.title)
: widget.title ?? SizedBox(),
),
bottom: widget.appBarBottom,
),

Loading…
Cancel
Save