Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Integrate LocallyAvailableBuilder with thumbnail options #632

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ that can be found in the LICENSE file. -->
### Improvements

- Make Live Photos gesture consist when scaling and panning.
- Integrate `LocallyAvailableBuilder` with thumbnail options to improve the thumbnail loading speed.

## 9.3.0

Expand Down
2 changes: 2 additions & 0 deletions lib/src/delegates/asset_picker_builder_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,8 @@ class DefaultAssetPickerBuilderDelegate
return LocallyAvailableBuilder(
asset: asset,
isOriginal: false,
withSubtype: false,
thumbnailOption: ThumbnailOption(size: gridThumbnailSize),
builder: (context, asset) {
final imageProvider = AssetEntityImageProvider(
asset,
Expand Down
5 changes: 5 additions & 0 deletions lib/src/widget/builder/image_page_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ class _ImagePageBuilderState extends State<ImagePageBuilder> {
key: ValueKey<String>(widget.asset.id),
asset: widget.asset,
isOriginal: _isOriginal,
withSubtype: _isOriginal,
thumbnailOption: switch (widget.previewThumbnailSize) {
final size? => ThumbnailOption(size: size),
_ => null,
},
builder: (BuildContext context, AssetEntity asset) {
// Initialize the video controller when the asset is a Live photo
// and available for further use.
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ dependencies:
flutter:
sdk: flutter

wechat_picker_library: ^1.0.2
wechat_picker_library: ^1.0.5

extended_image: ^8.3.0
photo_manager: ^3.4.0
photo_manager_image_provider: ^2.0.0
photo_manager_image_provider: ^2.1.2
provider: ^6.0.5
video_player: ^2.7.0

Expand Down
Loading