mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Bugfix for non mobile
This commit is contained in:
parent
fe5a667fd2
commit
38f2bc154b
2 changed files with 12 additions and 3 deletions
|
|
@ -74,6 +74,9 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
|
||||
final offlineMessageHeight = isOffline && !isDesktop ? 12 : 0;
|
||||
|
||||
final calculatedBottomViewPadding =
|
||||
showPlayerBar ? floatingPlayerHeight(context) + bottomViewPadding : bottomViewPadding;
|
||||
|
||||
return PopScope(
|
||||
canPop: currentIndex == 0,
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
|
|
@ -93,7 +96,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
),
|
||||
viewPadding: viewPaddingOf.copyWith(
|
||||
top: mediaQuery.viewPadding.top,
|
||||
bottom: showPlayerBar ? floatingPlayerHeight(context) + bottomViewPadding : bottomViewPadding,
|
||||
bottom: calculatedBottomViewPadding,
|
||||
),
|
||||
),
|
||||
//Builder to correctly apply new padding
|
||||
|
|
@ -118,6 +121,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
: null,
|
||||
bottomNavigationBar: AnimatedVisibility(
|
||||
visible: (isHomeScreen && AdaptiveLayout.viewSizeOf(context) == ViewSize.phone),
|
||||
hiddenHeight: calculatedBottomViewPadding,
|
||||
duration: const Duration(milliseconds: 250),
|
||||
child: HideOnScroll(
|
||||
controller: AdaptiveLayout.scrollOf(context),
|
||||
|
|
|
|||
|
|
@ -3,9 +3,14 @@ import 'package:flutter/material.dart';
|
|||
class AnimatedVisibility extends StatelessWidget {
|
||||
final Widget? child;
|
||||
final bool visible;
|
||||
final double hiddenHeight;
|
||||
final Duration duration;
|
||||
const AnimatedVisibility(
|
||||
{required this.child, required this.visible, this.duration = const Duration(milliseconds: 250), super.key});
|
||||
{required this.child,
|
||||
required this.visible,
|
||||
this.hiddenHeight = 16,
|
||||
this.duration = const Duration(milliseconds: 250),
|
||||
super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -15,7 +20,7 @@ class AnimatedVisibility extends StatelessWidget {
|
|||
child: IgnorePointer(
|
||||
ignoring: !visible,
|
||||
child: SizedBox(
|
||||
height: visible ? null : 16,
|
||||
height: visible ? null : hiddenHeight,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue