final
This commit is contained in:
@@ -10,11 +10,11 @@ import '../../widgets/general/navigationbar_logo.dart';
|
||||
import '../../routes.dart';
|
||||
|
||||
class MobileNavigationBar extends StatefulWidget {
|
||||
final String title;
|
||||
final bool back;
|
||||
final bool toHome;
|
||||
final bool showMe;
|
||||
const MobileNavigationBar({Key key, this.title, this.back, this.toHome, this.showMe}) : super(key: key);
|
||||
final String? title;
|
||||
final bool? back;
|
||||
final bool? toHome;
|
||||
final bool? showMe;
|
||||
const MobileNavigationBar({Key? key, this.title, this.back, this.toHome, this.showMe}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -24,19 +24,19 @@ class MobileNavigationBar extends StatefulWidget {
|
||||
}
|
||||
|
||||
class MobileNavigationBarState extends State<MobileNavigationBar> {
|
||||
User _user;
|
||||
User? _user;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
leading: widget.back ?
|
||||
leading: widget.back != null && widget.back! ?
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
if (widget.toHome) {
|
||||
if (widget.toHome != null && widget.toHome!) {
|
||||
Routes.router.navigateTo(context, '/', clearStack: true);
|
||||
} else {
|
||||
Routes.router.pop(context);
|
||||
@@ -53,7 +53,7 @@ class MobileNavigationBarState extends State<MobileNavigationBar> {
|
||||
},
|
||||
),
|
||||
title: Container(
|
||||
child: widget.title.isNotEmpty ?
|
||||
child: widget.title != null && widget.title!.isNotEmpty ?
|
||||
Container(
|
||||
child: Text(
|
||||
'${widget.title}',
|
||||
|
||||
Reference in New Issue
Block a user