Tweak UI style

This commit is contained in:
Ming Ming 2022-01-15 23:36:27 +08:00
parent 0e1f96999b
commit 5ba2e3639a

View file

@ -143,16 +143,13 @@ class _HomePhotosState extends State<HomePhotos>
.isEnableMemoryAlbumOr(true) && .isEnableMemoryAlbumOr(true) &&
_smartAlbums.isNotEmpty) _smartAlbums.isNotEmpty)
_buildSmartAlbumList(context), _buildSmartAlbumList(context),
SliverPadding( buildItemStreamList(
padding: const EdgeInsets.symmetric(vertical: 8), maxCrossAxisExtent: _thumbSize.toDouble(),
sliver: buildItemStreamList( onMaxExtentChanged: (value) {
maxCrossAxisExtent: _thumbSize.toDouble(), setState(() {
onMaxExtentChanged: (value) { _itemListMaxExtent = value;
setState(() { });
_itemListMaxExtent = value; },
});
},
),
), ),
], ],
), ),
@ -635,15 +632,14 @@ class _HomePhotosState extends State<HomePhotos>
: 0; : 0;
// scroll extent = list height - widget viewport height // scroll extent = list height - widget viewport height
// + sliver app bar height + metadata task header height // + sliver app bar height + metadata task header height
// + smart album list height + list padding // + smart album list height
final scrollExtent = _itemListMaxExtent! - final scrollExtent = _itemListMaxExtent! -
constraints.maxHeight + constraints.maxHeight +
_appBarExtent! + _appBarExtent! +
metadataTaskHeaderExtent + metadataTaskHeaderExtent +
smartAlbumListHeight + smartAlbumListHeight;
16;
_log.info( _log.info(
"[_getScrollViewExtent] $_itemListMaxExtent - ${constraints.maxHeight} + $_appBarExtent + $metadataTaskHeaderExtent + $smartAlbumListHeight + 16 = $scrollExtent"); "[_getScrollViewExtent] $_itemListMaxExtent - ${constraints.maxHeight} + $_appBarExtent + $metadataTaskHeaderExtent + $smartAlbumListHeight = $scrollExtent");
return scrollExtent; return scrollExtent;
} else { } else {
return null; return null;