mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07: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 offlineMessageHeight = isOffline && !isDesktop ? 12 : 0;
|
||||||
|
|
||||||
|
final calculatedBottomViewPadding =
|
||||||
|
showPlayerBar ? floatingPlayerHeight(context) + bottomViewPadding : bottomViewPadding;
|
||||||
|
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: currentIndex == 0,
|
canPop: currentIndex == 0,
|
||||||
onPopInvokedWithResult: (didPop, result) {
|
onPopInvokedWithResult: (didPop, result) {
|
||||||
|
|
@ -93,7 +96,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
||||||
),
|
),
|
||||||
viewPadding: viewPaddingOf.copyWith(
|
viewPadding: viewPaddingOf.copyWith(
|
||||||
top: mediaQuery.viewPadding.top,
|
top: mediaQuery.viewPadding.top,
|
||||||
bottom: showPlayerBar ? floatingPlayerHeight(context) + bottomViewPadding : bottomViewPadding,
|
bottom: calculatedBottomViewPadding,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//Builder to correctly apply new padding
|
//Builder to correctly apply new padding
|
||||||
|
|
@ -118,6 +121,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
||||||
: null,
|
: null,
|
||||||
bottomNavigationBar: AnimatedVisibility(
|
bottomNavigationBar: AnimatedVisibility(
|
||||||
visible: (isHomeScreen && AdaptiveLayout.viewSizeOf(context) == ViewSize.phone),
|
visible: (isHomeScreen && AdaptiveLayout.viewSizeOf(context) == ViewSize.phone),
|
||||||
|
hiddenHeight: calculatedBottomViewPadding,
|
||||||
duration: const Duration(milliseconds: 250),
|
duration: const Duration(milliseconds: 250),
|
||||||
child: HideOnScroll(
|
child: HideOnScroll(
|
||||||
controller: AdaptiveLayout.scrollOf(context),
|
controller: AdaptiveLayout.scrollOf(context),
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,14 @@ import 'package:flutter/material.dart';
|
||||||
class AnimatedVisibility extends StatelessWidget {
|
class AnimatedVisibility extends StatelessWidget {
|
||||||
final Widget? child;
|
final Widget? child;
|
||||||
final bool visible;
|
final bool visible;
|
||||||
|
final double hiddenHeight;
|
||||||
final Duration duration;
|
final Duration duration;
|
||||||
const AnimatedVisibility(
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -15,7 +20,7 @@ class AnimatedVisibility extends StatelessWidget {
|
||||||
child: IgnorePointer(
|
child: IgnorePointer(
|
||||||
ignoring: !visible,
|
ignoring: !visible,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: visible ? null : 16,
|
height: visible ? null : hiddenHeight,
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue