@@ -9,6 +9,9 @@ final class LDEvaluationResult {
9
9
/// Incremented by LaunchDarkly each time the flag's state changes.
10
10
final int version;
11
11
12
+ /// The version of the flag. Changes when modifications are made to the flag.
13
+ final int ? flagVersion;
14
+
12
15
/// True if a client SDK should track events for this flag.
13
16
final bool trackEvents;
14
17
@@ -24,15 +27,17 @@ final class LDEvaluationResult {
24
27
25
28
const LDEvaluationResult (
26
29
{required this .version,
30
+ this .flagVersion,
27
31
required this .detail,
28
32
this .trackEvents = false ,
29
33
this .trackReason = false ,
30
34
this .debugEventsUntilDate});
31
35
32
36
@override
33
37
String toString () {
34
- return 'LDEvaluationResult{version: $version , trackEvents: $trackEvents , '
35
- 'trackReason: $trackReason , debugEventsUntilDate: $debugEventsUntilDate ,'
38
+ return 'LDEvaluationResult{version: $version , flagVersion: $flagVersion ,'
39
+ ' trackEvents: $trackEvents , trackReason: $trackReason ,'
40
+ ' debugEventsUntilDate: $debugEventsUntilDate ,'
36
41
' detail: $detail }' ;
37
42
}
38
43
@@ -41,6 +46,7 @@ final class LDEvaluationResult {
41
46
identical (this , other) ||
42
47
other is LDEvaluationResult &&
43
48
version == other.version &&
49
+ flagVersion == other.flagVersion &&
44
50
trackEvents == other.trackEvents &&
45
51
trackReason == other.trackReason &&
46
52
debugEventsUntilDate == other.debugEventsUntilDate &&
@@ -49,6 +55,7 @@ final class LDEvaluationResult {
49
55
@override
50
56
int get hashCode =>
51
57
version.hashCode ^
58
+ flagVersion.hashCode ^
52
59
trackEvents.hashCode ^
53
60
trackReason.hashCode ^
54
61
debugEventsUntilDate.hashCode ^
0 commit comments