From 7540e083939ff490a54354badd75fe05f7319934 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Sat, 5 Nov 2022 11:58:17 +0530 Subject: [PATCH] added scrollbar in file info --- lib/ui/viewer/file/file_info_widget.dart | 63 +++++++++++++----------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/lib/ui/viewer/file/file_info_widget.dart b/lib/ui/viewer/file/file_info_widget.dart index b2b417d60..c38d58c54 100644 --- a/lib/ui/viewer/file/file_info_widget.dart +++ b/lib/ui/viewer/file/file_info_widget.dart @@ -257,36 +257,41 @@ class _FileInfoWidgetState extends State { return SafeArea( top: false, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: CustomScrollView( - shrinkWrap: true, - slivers: [ - TitleBarWidget( - isFlexibleSpaceDisabled: true, - title: "Details", - isOnTopOfScreen: false, - leading: IconButtonWidget( - icon: Icons.close_outlined, - iconButtonType: IconButtonType.primary, - onTap: () => Navigator.pop(context), + child: Scrollbar( + thickness: 4, + radius: const Radius.circular(2), + thumbVisibility: true, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: CustomScrollView( + shrinkWrap: true, + slivers: [ + TitleBarWidget( + isFlexibleSpaceDisabled: true, + title: "Details", + isOnTopOfScreen: false, + leading: IconButtonWidget( + icon: Icons.close_outlined, + iconButtonType: IconButtonType.primary, + onTap: () => Navigator.pop(context), + ), ), - ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - if (index.isOdd) { - return index == 1 - ? const SizedBox.shrink() - : const DividerWidget(dividerType: DividerType.menu); - } else { - return listTiles[index ~/ 2]; - } - }, - childCount: (listTiles.length * 2) - 1, - ), - ) - ], + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + if (index.isOdd) { + return index == 1 + ? const SizedBox.shrink() + : const DividerWidget(dividerType: DividerType.menu); + } else { + return listTiles[index ~/ 2]; + } + }, + childCount: (listTiles.length * 2) - 1, + ), + ) + ], + ), ), ), );