Skip to content
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
3 changes: 3 additions & 0 deletions packages/rfw/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.27
* Adds support for `DecorationImage.filterQuality`.

## 1.0.26
* Supports overriding the error widget builder.

Expand Down
1 change: 1 addition & 0 deletions packages/rfw/lib/src/flutter/argument_decoders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ class ArgumentDecoders {
centerSlice: rect(source, [...key, 'centerSlice']),
repeat: enumValue<ImageRepeat>(ImageRepeat.values, source, [...key, 'repeat']) ?? ImageRepeat.noRepeat,
matchTextDirection: source.v<bool>([...key, 'matchTextDirection']) ?? false,
filterQuality: enumValue<FilterQuality>(FilterQuality.values, source, [...key, 'filterQuality']) ?? FilterQuality.medium,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/rfw/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: rfw
description: "Remote Flutter widgets: a library for rendering declarative widget description files at runtime."
repository: https://github.com/flutter/packages/tree/main/packages/rfw
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+rfw%22
version: 1.0.26
version: 1.0.27

environment:
sdk: ^3.2.0
Expand Down
6 changes: 4 additions & 2 deletions packages/rfw/test/argument_decoders_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ void main() {
1.0, 1.0, 1.0, 1.0, 1.0,
],
},
filterQuality: "none",
},
gradient: {
type: 'sweep',
Expand All @@ -314,6 +315,7 @@ void main() {
blendMode: "xor",
},
onError: event 'image-error-event' { },
filterQuality: "high",
},
gradient: {
type: 'linear',
Expand Down Expand Up @@ -383,13 +385,13 @@ void main() {
(tester.widgetList<DecoratedBox>(find.byType(DecoratedBox)).toList()[1].decoration as BoxDecoration).image.toString(),
'DecorationImage(AssetImage(bundle: null, name: "asset"), ' // this just seemed like the easiest way to check all this...
'ColorFilter.matrix([$matrix]), '
'Alignment.center, centerSlice: Rect.fromLTRB(5.0, 8.0, 105.0, 78.0), scale 1.0, opacity 1.0, FilterQuality.low)',
'Alignment.center, centerSlice: Rect.fromLTRB(5.0, 8.0, 105.0, 78.0), scale 1.0, opacity 1.0, FilterQuality.none)',
);
expect(
(tester.widgetList<DecoratedBox>(find.byType(DecoratedBox)).toList()[0].decoration as BoxDecoration).image.toString(),
'DecorationImage(NetworkImage("x-invalid://", scale: 1.0), '
'ColorFilter.mode(Color(0xff8811ff), BlendMode.xor), Alignment.center, scale 1.0, '
'opacity 1.0, FilterQuality.low)',
'opacity 1.0, FilterQuality.high)',
);

ArgumentDecoders.colorFilterDecoders['custom'] = (DataSource source, List<Object> key) {
Expand Down