Skip to content

Commit cb4af5a

Browse files
Merge pull request #30 from trullse/main
Fix color fromJson method
2 parents 0c626c0 + dfd1d22 commit cb4af5a

File tree

5 files changed

+58
-82
lines changed

5 files changed

+58
-82
lines changed

packages/google_vision/lib/src/model/color.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ part 'color.g.dart';
2323
@JsonSerializable()
2424
class Color {
2525
/// The amount of red in the color as a value in the interval \[0, 1\].
26+
@JsonKey(defaultValue: 0.0)
2627
final double red;
2728

2829
/// The amount of green in the color as a value in the interval \[0, 1\].
30+
@JsonKey(defaultValue: 0.0)
2931
final double green;
3032

3133
/// The amount of blue in the color as a value in the interval \[0, 1\].
34+
@JsonKey(defaultValue: 0.0)
3235
final double blue;
3336

3437
/// The amount of alpha in the color as a value in the interval \[0, 1\].

packages/google_vision/lib/src/model/color.g.dart

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google_vision/lib/src/provider/files.g.dart

Lines changed: 17 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google_vision/lib/src/provider/images.g.dart

Lines changed: 17 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google_vision/lib/src/provider/oauth.g.dart

Lines changed: 18 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)