Minor refactor
This commit is contained in:
parent
8c92ac15bb
commit
526f755875
1 changed files with 14 additions and 10 deletions
|
@ -69,16 +69,7 @@ class _HomeWidgetState extends State<HomeWidget> {
|
|||
if (snapshot.hasData) {
|
||||
return IndexedStack(
|
||||
children: <Widget>[
|
||||
Gallery(
|
||||
_getFilteredPhotos(PhotoRepository.instance.photos),
|
||||
_selectedPhotos,
|
||||
photoSelectionChangeCallback: (Set<Photo> selectedPhotos) {
|
||||
setState(() {
|
||||
_selectedPhotos = selectedPhotos;
|
||||
});
|
||||
},
|
||||
enablePullToSync: true,
|
||||
),
|
||||
_getMainGalleryWidget(),
|
||||
_deviceFolderGalleryWidget,
|
||||
_remoteFolderGalleryWidget,
|
||||
],
|
||||
|
@ -112,6 +103,19 @@ class _HomeWidgetState extends State<HomeWidget> {
|
|||
);
|
||||
}
|
||||
|
||||
Gallery _getMainGalleryWidget() {
|
||||
return Gallery(
|
||||
_getFilteredPhotos(PhotoRepository.instance.photos),
|
||||
_selectedPhotos,
|
||||
photoSelectionChangeCallback: (Set<Photo> selectedPhotos) {
|
||||
setState(() {
|
||||
_selectedPhotos = selectedPhotos;
|
||||
});
|
||||
},
|
||||
enablePullToSync: true,
|
||||
);
|
||||
}
|
||||
|
||||
BottomNavigationBar _buildBottomNavigationBar() {
|
||||
return BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
|
|
Loading…
Add table
Reference in a new issue