Appbar on homepage is fixed so the cursor won't be overlapping when scrolling

This commit is contained in:
Alex 2022-04-30 17:03:45 -05:00
parent 8d5626620b
commit 229357df2b
3 changed files with 36 additions and 28 deletions

View File

@ -12,7 +12,7 @@ class ImageGrid extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
return SliverGrid( return SliverGrid(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 4,
crossAxisSpacing: 5.0, crossAxisSpacing: 5.0,
mainAxisSpacing: 5, mainAxisSpacing: 5,
), ),

View File

@ -100,13 +100,23 @@ class HomePage extends HookConsumerWidget {
top: !isMultiSelectEnable, top: !isMultiSelectEnable,
child: Stack( child: Stack(
children: [ children: [
DraggableScrollbar.semicircle( CustomScrollView(
slivers: [
_buildSliverAppBar(),
],
),
Padding(
padding: const EdgeInsets.only(top: 50.0),
child: DraggableScrollbar.semicircle(
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
controller: _scrollController, controller: _scrollController,
heightScrollThumb: 48.0, heightScrollThumb: 48.0,
child: CustomScrollView( child: CustomScrollView(
controller: _scrollController, controller: _scrollController,
slivers: [_buildSliverAppBar(), ..._imageGridGroup], slivers: [
..._imageGridGroup,
],
),
), ),
), ),
_buildSelectedItemCountIndicator(), _buildSelectedItemCountIndicator(),

View File

@ -215,8 +215,7 @@ class AlbumViewerPage extends HookConsumerWidget {
onTap: () { onTap: () {
titleFocusNode.unfocus(); titleFocusNode.unfocus();
}, },
child: Stack(children: [ child: DraggableScrollbar.semicircle(
DraggableScrollbar.semicircle(
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
controller: _scrollController, controller: _scrollController,
heightScrollThumb: 48.0, heightScrollThumb: 48.0,
@ -239,7 +238,6 @@ class AlbumViewerPage extends HookConsumerWidget {
], ],
), ),
), ),
]),
); );
} }