album: fixed scroll thumb height

This commit is contained in:
Thibault Deckers 2020-03-10 09:53:33 +09:00
parent ad653e8730
commit d37941c66f
2 changed files with 19 additions and 15 deletions

View file

@ -44,17 +44,8 @@ class ThumbnailCollection extends StatelessWidget {
columnCountNotifier: _columnCountNotifier, columnCountNotifier: _columnCountNotifier,
child: ValueListenableBuilder( child: ValueListenableBuilder(
valueListenable: _columnCountNotifier, valueListenable: _columnCountNotifier,
builder: (context, columnCount, child) => DraggableScrollbar( builder: (context, columnCount, child) {
heightScrollThumb: 48, final scrollView = CustomScrollView(
backgroundColor: Colors.white,
scrollThumbBuilder: _thumbArrowBuilder(false),
controller: _scrollController,
padding: EdgeInsets.only(
// padding to get scroll thumb below app bar, above nav bar
top: topPadding,
bottom: mqViewInsetsBottom,
),
child: CustomScrollView(
key: _scrollableKey, key: _scrollableKey,
controller: _scrollController, controller: _scrollController,
slivers: [ slivers: [
@ -79,8 +70,21 @@ class ThumbnailCollection extends StatelessWidget {
), ),
), ),
], ],
), );
),
return DraggableScrollbar(
heightScrollThumb: 48,
backgroundColor: Colors.white,
scrollThumbBuilder: _thumbArrowBuilder(false),
controller: _scrollController,
padding: EdgeInsets.only(
// padding to get scroll thumb below app bar, above nav bar
top: topPadding,
bottom: mqViewInsetsBottom,
),
child: scrollView,
);
},
), ),
); );
}, },
@ -103,11 +107,11 @@ class ThumbnailCollection extends StatelessWidget {
Radius.circular(12.0), Radius.circular(12.0),
), ),
), ),
height: height,
margin: const EdgeInsets.only(right: .5), margin: const EdgeInsets.only(right: .5),
padding: const EdgeInsets.all(2), padding: const EdgeInsets.all(2),
child: ClipPath( child: ClipPath(
child: Container( child: Container(
height: height,
width: 20.0, width: 20.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: backgroundColor, color: backgroundColor,

View file

@ -76,7 +76,7 @@ packages:
description: description:
path: "." path: "."
ref: HEAD ref: HEAD
resolved-ref: d7bd215380458393bd3dd5aa2e671f73606086f8 resolved-ref: "3b823ae0a9def4edec62771f18e6348312bfce15"
url: "git://github.com/deckerst/flutter-draggable-scrollbar.git" url: "git://github.com/deckerst/flutter-draggable-scrollbar.git"
source: git source: git
version: "0.0.4" version: "0.0.4"