Skip to content

Commit a4fe359

Browse files
Flutter warnings fixed (part 2) (#206)
* Flutter warnings fixed (#204) Co-authored-by: GitHub Action <[email protected]> * Flutter warnings fixed (part 2) --------- Co-authored-by: GitHub Action <[email protected]>
1 parent a8c9b0b commit a4fe359

File tree

8 files changed

+20
-69
lines changed

8 files changed

+20
-69
lines changed

lib/src/dto/eligibility.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum QEligibilityStatus {
1313
eligible,
1414
}
1515

16-
@JsonSerializable()
16+
@JsonSerializable(createToJson: false)
1717
class QEligibility {
1818
@JsonKey(name: "status", defaultValue: QEligibilityStatus.unknown)
1919
final QEligibilityStatus status;

lib/src/dto/eligibility.g.dart

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

lib/src/dto/launch_mode.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'package:json_annotation/json_annotation.dart';
2-
31
enum QLaunchMode {
42
analytics,
53
subscriptionManagement,

lib/src/dto/screen_presentation_config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'screen_presentation_style.dart';
33

44
part 'screen_presentation_config.g.dart';
55

6-
@JsonSerializable()
6+
@JsonSerializable(createFactory: false)
77
class QScreenPresentationConfig {
88
/// Describes how screens will be displayed.
99
/// For mode details see the enum description.

lib/src/dto/screen_presentation_config.g.dart

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

lib/src/dto/sku_details/sku_details.dart

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Copyright 2019 The Chromium Authors. All rights reserved.
22

3-
import 'dart:ui' show hashValues;
4-
53
import 'package:json_annotation/json_annotation.dart';
64

75
part 'sku_details.g.dart';
@@ -112,29 +110,28 @@ class SkuDetailsWrapper {
112110
return false;
113111
}
114112

115-
final SkuDetailsWrapper typedOther = other;
116-
return typedOther is SkuDetailsWrapper &&
117-
typedOther.description == description &&
118-
typedOther.freeTrialPeriod == freeTrialPeriod &&
119-
typedOther.introductoryPrice == introductoryPrice &&
120-
typedOther.introductoryPriceAmountMicros ==
113+
return other is SkuDetailsWrapper &&
114+
other.description == description &&
115+
other.freeTrialPeriod == freeTrialPeriod &&
116+
other.introductoryPrice == introductoryPrice &&
117+
other.introductoryPriceAmountMicros ==
121118
introductoryPriceAmountMicros &&
122-
typedOther.introductoryPriceCycles == introductoryPriceCycles &&
123-
typedOther.introductoryPricePeriod == introductoryPricePeriod &&
124-
typedOther.price == price &&
125-
typedOther.priceAmountMicros == priceAmountMicros &&
126-
typedOther.sku == sku &&
127-
typedOther.subscriptionPeriod == subscriptionPeriod &&
128-
typedOther.title == title &&
129-
typedOther.type == type &&
130-
typedOther.originalPrice == originalPrice &&
131-
typedOther.originalPriceAmountMicros == originalPriceAmountMicros &&
132-
typedOther.originalJson == originalJson;
119+
other.introductoryPriceCycles == introductoryPriceCycles &&
120+
other.introductoryPricePeriod == introductoryPricePeriod &&
121+
other.price == price &&
122+
other.priceAmountMicros == priceAmountMicros &&
123+
other.sku == sku &&
124+
other.subscriptionPeriod == subscriptionPeriod &&
125+
other.title == title &&
126+
other.type == type &&
127+
other.originalPrice == originalPrice &&
128+
other.originalPriceAmountMicros == originalPriceAmountMicros &&
129+
other.originalJson == originalJson;
133130
}
134131

135132
@override
136133
int get hashCode {
137-
return hashValues(
134+
return Object.hash(
138135
description.hashCode,
139136
freeTrialPeriod.hashCode,
140137
introductoryPrice.hashCode,

lib/src/dto/user.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:json_annotation/json_annotation.dart';
22

33
part 'user.g.dart';
44

5-
@JsonSerializable()
5+
@JsonSerializable(createToJson: false)
66
class QUser {
77
@JsonKey(name: "qonversionId")
88
final String qonversionId;

lib/src/dto/user.g.dart

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

0 commit comments

Comments
 (0)