Sample code for ImageProvider#131952
Conversation
9cdd279 to
b45c51d
Compare
There was a problem hiding this comment.
Isn't configuration.platform an enum so this could be simplified to:
| if (configuration.platform == null) | |
| 'platform': null.toString(), | |
| if (configuration.platform != null) | |
| 'platform': configuration.platform!.toString().substring('$TargetPlatform'.length + 1), | |
| 'platform': configuration.platform?.name ?? null.toString(), |
There was a problem hiding this comment.
oh I always forget about EnumName because it's not in the API docs for Enum
There was a problem hiding this comment.
Right! Send a PR to add it? ;)
There was a problem hiding this comment.
it simplified even more than you suggested, heh
There was a problem hiding this comment.
Submitted dart-lang/sdk#53164 for the Enum doc issue.
There was a problem hiding this comment.
| if (configuration.textDirection == null) | |
| 'bidi': null.toString(), | |
| if (configuration.textDirection == TextDirection.ltr) | |
| 'bidi': 'ltr', | |
| if (configuration.textDirection == TextDirection.rtl) | |
| 'bidi': 'rtl', | |
| 'bidi': configuration.textDirection?.name ?? null.toString(), |
There was a problem hiding this comment.
nit: formatting here seems off. Maybe move this to the previous line (or indent the .then lines further)?
|
auto label is removed for flutter/flutter/131952, due to - The status or check suite Linux web_canvaskit_tests_3 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Also: - minor improvements to documentation - wrap one of our test error messages in a manner more consistent with other messages
Also: