@@ -9,6 +9,9 @@ final class LDEvaluationResult {
99 /// Incremented by LaunchDarkly each time the flag's state changes.
1010 final int version;
1111
12+ /// The version of the flag. Changes when modifications are made to the flag.
13+ final int ? flagVersion;
14+
1215 /// True if a client SDK should track events for this flag.
1316 final bool trackEvents;
1417
@@ -24,15 +27,17 @@ final class LDEvaluationResult {
2427
2528 const LDEvaluationResult (
2629 {required this .version,
30+ this .flagVersion,
2731 required this .detail,
2832 this .trackEvents = false ,
2933 this .trackReason = false ,
3034 this .debugEventsUntilDate});
3135
3236 @override
3337 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 ,'
3641 ' detail: $detail }' ;
3742 }
3843
@@ -41,6 +46,7 @@ final class LDEvaluationResult {
4146 identical (this , other) ||
4247 other is LDEvaluationResult &&
4348 version == other.version &&
49+ flagVersion == other.flagVersion &&
4450 trackEvents == other.trackEvents &&
4551 trackReason == other.trackReason &&
4652 debugEventsUntilDate == other.debugEventsUntilDate &&
@@ -49,6 +55,7 @@ final class LDEvaluationResult {
4955 @override
5056 int get hashCode =>
5157 version.hashCode ^
58+ flagVersion.hashCode ^
5259 trackEvents.hashCode ^
5360 trackReason.hashCode ^
5461 debugEventsUntilDate.hashCode ^
0 commit comments