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

[image_picker] Migrates from deprecated UnmodifiableUint8ListView #5248

Closed
Closed
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.9.4

* Migrates away from deprecated `UnmodifiableUint8ListView`.

## NEXT

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PickedFile extends PickedFileBase {

Future<Uint8List> get _bytes async {
if (_initBytes != null) {
return Future<Uint8List>.value(UnmodifiableUint8ListView(_initBytes!));
return Future<Uint8List>.value(_initBytes!.asUnmodifiableView());
}
return http.readBytes(Uri.parse(path));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ repository: https://github.com/flutter/packages/tree/main/packages/image_picker/
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.9.3
version: 2.9.4

environment:
sdk: ^3.1.0
flutter: ">=3.13.0"
sdk: ^3.3.0
flutter: ">=3.19.0"

dependencies:
cross_file: ^0.3.1+1
Expand Down