From 5ba2e3639accc55c7b62df4c7ead8e1ab5548afc Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Sat, 15 Jan 2022 23:36:27 +0800 Subject: [PATCH] Tweak UI style --- lib/widget/home_photos.dart | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/widget/home_photos.dart b/lib/widget/home_photos.dart index bbc9b8a6..cccb70ce 100644 --- a/lib/widget/home_photos.dart +++ b/lib/widget/home_photos.dart @@ -143,16 +143,13 @@ class _HomePhotosState extends State .isEnableMemoryAlbumOr(true) && _smartAlbums.isNotEmpty) _buildSmartAlbumList(context), - SliverPadding( - padding: const EdgeInsets.symmetric(vertical: 8), - sliver: buildItemStreamList( - maxCrossAxisExtent: _thumbSize.toDouble(), - onMaxExtentChanged: (value) { - setState(() { - _itemListMaxExtent = value; - }); - }, - ), + buildItemStreamList( + maxCrossAxisExtent: _thumbSize.toDouble(), + onMaxExtentChanged: (value) { + setState(() { + _itemListMaxExtent = value; + }); + }, ), ], ), @@ -635,15 +632,14 @@ class _HomePhotosState extends State : 0; // scroll extent = list height - widget viewport height // + sliver app bar height + metadata task header height - // + smart album list height + list padding + // + smart album list height final scrollExtent = _itemListMaxExtent! - constraints.maxHeight + _appBarExtent! + metadataTaskHeaderExtent + - smartAlbumListHeight + - 16; + smartAlbumListHeight; _log.info( - "[_getScrollViewExtent] $_itemListMaxExtent - ${constraints.maxHeight} + $_appBarExtent + $metadataTaskHeaderExtent + $smartAlbumListHeight + 16 = $scrollExtent"); + "[_getScrollViewExtent] $_itemListMaxExtent - ${constraints.maxHeight} + $_appBarExtent + $metadataTaskHeaderExtent + $smartAlbumListHeight = $scrollExtent"); return scrollExtent; } else { return null;