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,
child: ValueListenableBuilder(
valueListenable: _columnCountNotifier,
builder: (context, columnCount, child) => 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: CustomScrollView(
builder: (context, columnCount, child) {
final scrollView = CustomScrollView(
key: _scrollableKey,
controller: _scrollController,
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),
),
),
height: height,
margin: const EdgeInsets.only(right: .5),
padding: const EdgeInsets.all(2),
child: ClipPath(
child: Container(
height: height,
width: 20.0,
decoration: BoxDecoration(
color: backgroundColor,

View file

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