Remove redundant HomePageAppBar

This commit is contained in:
Neeraj Gupta 2022-10-20 11:10:57 +05:30
parent 0759d4a839
commit cc4cae78bc
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -53,7 +53,6 @@ import 'package:photos/ui/settings_page.dart';
import 'package:photos/ui/shared_collections_gallery.dart';
import 'package:photos/ui/status_bar_widget.dart';
import 'package:photos/ui/viewer/gallery/gallery.dart';
import 'package:photos/ui/viewer/gallery/gallery_app_bar_widget.dart';
import 'package:photos/ui/viewer/gallery/gallery_footer_widget.dart';
import 'package:photos/ui/viewer/gallery/gallery_overlay_widget.dart';
import 'package:photos/utils/dialog_util.dart';
@ -487,7 +486,6 @@ class _HomeWidgetState extends State<HomeWidget> {
Container(
child: gallery,
),
HomePageAppBar(_selectedFiles),
],
);
}
@ -543,45 +541,6 @@ class _HomeWidgetState extends State<HomeWidget> {
}
}
class HomePageAppBar extends StatefulWidget {
const HomePageAppBar(
this.selectedFiles, {
Key key,
}) : super(key: key);
final SelectedFiles selectedFiles;
@override
State<HomePageAppBar> createState() => _HomePageAppBarState();
}
class _HomePageAppBarState extends State<HomePageAppBar> {
@override
void initState() {
super.initState();
widget.selectedFiles.addListener(() {
setState(() {});
});
}
@override
Widget build(BuildContext context) {
final appBar = SizedBox(
height: 60,
child: GalleryAppBarWidget(
GalleryType.homepage,
null,
widget.selectedFiles,
),
);
if (widget.selectedFiles.files.isEmpty) {
return IgnorePointer(child: appBar);
} else {
return appBar;
}
}
}
class HomeBottomNavigationBar extends StatefulWidget {
const HomeBottomNavigationBar(
this.selectedFiles, {