@@ -38,8 +38,8 @@ class AdInfoFromDash {
3838
3939 /// Parse the ad information from a map. Returns null if the map is null or empty. Otherwise, returns a new instance of [AdInfoFromDash] .
4040 static AdInfoFromDash ? fromAdInfoMap (Map <Object ?, Object ?>? adInfo) {
41- if (adInfo! .isNotEmpty) {
42- final int adId = adInfo['id' ]! as int ;
41+ if (adInfo? .isNotEmpty ?? false ) {
42+ final int adId = adInfo! ['id' ]! as int ;
4343 final int startTime = adInfo['start_ms' ]! as int ;
4444 final int endTime = adInfo['end_ms' ]! as int ;
4545 final int durationTime = adInfo['duration_ms' ]! as int ;
@@ -48,13 +48,12 @@ class AdInfoFromDash {
4848 final bool cancelIndicator = adInfo['cancel_indicator' ]! as bool ;
4949
5050 return AdInfoFromDash (
51- adId: adId,
52- cancelIndicator: cancelIndicator,
53- startTime: startTime,
54- endTime: endTime,
55- durationTime: durationTime,
56- outOfNetworkIndicator: outOfNetworkIndicator,
57- );
51+ adId: adId,
52+ cancelIndicator: cancelIndicator,
53+ startTime: startTime,
54+ endTime: endTime,
55+ durationTime: durationTime,
56+ outOfNetworkIndicator: outOfNetworkIndicator);
5857 }
5958
6059 return null ;
@@ -84,12 +83,6 @@ class AdInfoFromDash {
8483 outOfNetworkIndicator == other.outOfNetworkIndicator;
8584
8685 @override
87- int get hashCode => Object .hash (
88- adId,
89- cancelIndicator,
90- startTime,
91- endTime,
92- durationTime,
93- outOfNetworkIndicator,
94- );
86+ int get hashCode => Object .hash (adId, cancelIndicator, startTime, endTime,
87+ durationTime, outOfNetworkIndicator);
9588}
0 commit comments