mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 13:38:13 -08:00
[Bugfix] Properly show FAB in ScreenLayout.dual
This commit is contained in:
parent
aaa6a737cb
commit
c4f33e5039
3 changed files with 3 additions and 12 deletions
|
|
@ -139,7 +139,7 @@ class _NavigationBodyState extends ConsumerState<NavigationBody> {
|
|||
},
|
||||
icon: const Icon(IconsaxBold.menu),
|
||||
),
|
||||
if (AdaptiveLayout.of(context).isDesktop) ...[
|
||||
if (AdaptiveLayout.of(context).size == ScreenLayout.dual) ...[
|
||||
const SizedBox(height: 8),
|
||||
AnimatedFadeSize(
|
||||
child: AnimatedSwitcher(
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class NestedNavigationDrawer extends ConsumerWidget {
|
|||
),
|
||||
...views.map((library) => DrawerListButton(
|
||||
label: library.name,
|
||||
selected: checkLibrary(context, library.id),
|
||||
selected: context.router.currentUrl.contains(library.id),
|
||||
actions: [
|
||||
ItemActionButton(
|
||||
label: Text(context.localized.scanLibrary),
|
||||
|
|
@ -151,13 +151,4 @@ class NestedNavigationDrawer extends ConsumerWidget {
|
|||
],
|
||||
);
|
||||
}
|
||||
|
||||
bool checkLibrary(BuildContext context, String id) {
|
||||
try {
|
||||
return context.router.current.name == LibrarySearchRoute().routeName &&
|
||||
(context.routeData.queryParams.isNotEmpty && context.routeData.queryParams.getString('parentId') == id);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
extendBody: true,
|
||||
floatingActionButtonLocation:
|
||||
playerState == VideoPlayerState.minimized ? FloatingActionButtonLocation.centerFloat : null,
|
||||
floatingActionButton: AdaptiveLayout.of(context).layout == LayoutState.phone
|
||||
floatingActionButton: AdaptiveLayout.of(context).size == ScreenLayout.single
|
||||
? switch (playerState) {
|
||||
VideoPlayerState.minimized => const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue