Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[ios_platform_images] ignore DecoderCallback deprecation #5806

Merged
merged 1 commit into from
May 25, 2022
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
4 changes: 4 additions & 0 deletions packages/ios_platform_images/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0+9

* Ignores the warning for the upcoming deprecation of `DecoderCallback`.

## 0.2.0+8

* Ignores the warning for the upcoming deprecation of `ImageProvider.load` in the correct line.
Expand Down
2 changes: 2 additions & 0 deletions packages/ios_platform_images/lib/ios_platform_images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class _FutureMemoryImage extends ImageProvider<_FutureMemoryImage> {
/// See [ImageProvider.load].
// TODO(jmagman): Implement the new API once it lands, https://github.com/flutter/flutter/issues/103556
@override
// ignore: deprecated_member_use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should we be doing instead, and when? It would be good to have a TODO with an issue capturing what we should be changing this code to, and what version of Flutter needs to be on stable before we can change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is flutter/flutter#103556

and what version of Flutter needs to be on stable before we can change.

That is TBD. I can't actually land the PR required to add/deprecate this functionality until this repo is green, plus rolling into google3. That could take another week or it could take another two months.

As part of this change I will have a migration guide, but that also can't be submitted until we have a version which is contingent on rolling into g3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it; just a TODO to reimplement once possible with a reference to the issue link works then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the one on L67 good enough? 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦🏻

In my defense there's an entire line between this line and that comment!

Oh, and now that I see line 65 I see why I'm getting deja-vu here. Should we just put this ignore on every other line of the file just to be safe? 😬

ImageStreamCompleter load(_FutureMemoryImage key, DecoderCallback decode) {
return _FutureImageStreamCompleter(
codec: _loadAsync(key, decode),
Expand All @@ -75,6 +76,7 @@ class _FutureMemoryImage extends ImageProvider<_FutureMemoryImage> {

Future<ui.Codec> _loadAsync(
_FutureMemoryImage key,
// ignore: deprecated_member_use
DecoderCallback decode,
) async {
assert(key == this);
Expand Down
2 changes: 1 addition & 1 deletion packages/ios_platform_images/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ios_platform_images
description: A plugin to share images between Flutter and iOS in add-to-app setups.
repository: https://github.com/flutter/plugins/tree/main/packages/ios_platform_images
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+ios_platform_images%22
version: 0.2.0+8
version: 0.2.0+9

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down