fixed scroll view bottom padding for nav bar
This commit is contained in:
parent
66b57d9875
commit
4759fd52f2
4 changed files with 34 additions and 1 deletions
|
@ -31,6 +31,7 @@ import 'package:aves/widgets/common/identity/scroll_thumb.dart';
|
||||||
import 'package:aves/widgets/common/providers/tile_extent_controller_provider.dart';
|
import 'package:aves/widgets/common/providers/tile_extent_controller_provider.dart';
|
||||||
import 'package:aves/widgets/common/thumbnail/decorated.dart';
|
import 'package:aves/widgets/common/thumbnail/decorated.dart';
|
||||||
import 'package:aves/widgets/common/tile_extent_controller.dart';
|
import 'package:aves/widgets/common/tile_extent_controller.dart';
|
||||||
|
import 'package:aves/widgets/navigation/nav_bar/nav_bar.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -386,6 +387,7 @@ class _CollectionScrollViewState extends State<_CollectionScrollView> {
|
||||||
child: _buildEmptyCollectionPlaceholder(collection),
|
child: _buildEmptyCollectionPlaceholder(collection),
|
||||||
)
|
)
|
||||||
: const SectionedListSliver<AvesEntry>(),
|
: const SectionedListSliver<AvesEntry>(),
|
||||||
|
const NavBarPaddingSliver(),
|
||||||
const BottomPaddingSliver(),
|
const BottomPaddingSliver(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -547,6 +547,7 @@ class _FilterScrollView<T extends CollectionFilter> extends StatelessWidget {
|
||||||
)
|
)
|
||||||
: SectionedListSliver<FilterGridItem<T>>();
|
: SectionedListSliver<FilterGridItem<T>>();
|
||||||
}),
|
}),
|
||||||
|
const NavBarPaddingSliver(),
|
||||||
const BottomPaddingSliver(),
|
const BottomPaddingSliver(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,6 +22,10 @@ class AppBottomNavBar extends StatelessWidget {
|
||||||
this.currentCollection,
|
this.currentCollection,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
static const padding = EdgeInsets.all(8);
|
||||||
|
|
||||||
|
static double get height => kBottomNavigationBarHeight + padding.vertical;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const borderRadius = BorderRadius.all(Radius.circular(8));
|
const borderRadius = BorderRadius.all(Radius.circular(8));
|
||||||
|
@ -37,7 +41,7 @@ class AppBottomNavBar extends StatelessWidget {
|
||||||
];
|
];
|
||||||
|
|
||||||
Widget child = Padding(
|
Widget child = Padding(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: padding,
|
||||||
child: BlurredRRect(
|
child: BlurredRRect(
|
||||||
enabled: blurred,
|
enabled: blurred,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
@ -115,3 +119,19 @@ class AppBottomNavBar extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class NavBarPaddingSliver extends StatelessWidget {
|
||||||
|
const NavBarPaddingSliver({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SliverToBoxAdapter(
|
||||||
|
child: Selector<Settings, bool>(
|
||||||
|
selector: (context, s) => s.showBottomNavigationBar,
|
||||||
|
builder: (context, showBottomNavigationBar, child) {
|
||||||
|
return SizedBox(height: showBottomNavigationBar ? AppBottomNavBar.height : 0);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
"settingsThumbnailShowTagIcon"
|
"settingsThumbnailShowTagIcon"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"es": [
|
||||||
|
"settingsShowBottomNavigationBar",
|
||||||
|
"settingsThumbnailShowTagIcon"
|
||||||
|
],
|
||||||
|
|
||||||
"fr": [
|
"fr": [
|
||||||
"settingsSearchFieldLabel",
|
"settingsSearchFieldLabel",
|
||||||
"settingsSearchEmpty",
|
"settingsSearchEmpty",
|
||||||
|
@ -20,6 +25,11 @@
|
||||||
"settingsThumbnailShowTagIcon"
|
"settingsThumbnailShowTagIcon"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"it": [
|
||||||
|
"settingsShowBottomNavigationBar",
|
||||||
|
"settingsThumbnailShowTagIcon"
|
||||||
|
],
|
||||||
|
|
||||||
"ja": [
|
"ja": [
|
||||||
"entryActionShowGeoTiffOnMap",
|
"entryActionShowGeoTiffOnMap",
|
||||||
"entryActionConvertMotionPhotoToStillImage",
|
"entryActionConvertMotionPhotoToStillImage",
|
||||||
|
|
Loading…
Reference in a new issue