diff --git a/packages/video_player/video_player/CHANGELOG.md b/packages/video_player/video_player/CHANGELOG.md index 918a3615feb0..c40faab2e1c6 100644 --- a/packages/video_player/video_player/CHANGELOG.md +++ b/packages/video_player/video_player/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.3 + +* Fix pointer value to boolean conversion analyzer warnings. + ## 2.1.2 * Migrate maven repository from jcenter to mavenCentral. diff --git a/packages/video_player/video_player/ios/Classes/messages.m b/packages/video_player/video_player/ios/Classes/messages.m index 14e375b33378..0936bbc7d995 100644 --- a/packages/video_player/video_player/ios/Classes/messages.m +++ b/packages/video_player/video_player/ios/Classes/messages.m @@ -65,9 +65,9 @@ + (FLTTextureMessage *)fromMap:(NSDictionary *)dict { return result; } - (NSDictionary *)toMap { - return - [NSDictionary dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), - @"textureId", nil]; + return [NSDictionary + dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]), + @"textureId", nil]; } @end @@ -124,9 +124,10 @@ + (FLTLoopingMessage *)fromMap:(NSDictionary *)dict { } - (NSDictionary *)toMap { return [NSDictionary - dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId", - (self.isLooping ? self.isLooping : [NSNull null]), @"isLooping", - nil]; + dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]), + @"textureId", + (self.isLooping != nil ? self.isLooping : [NSNull null]), + @"isLooping", nil]; } @end @@ -145,8 +146,9 @@ + (FLTVolumeMessage *)fromMap:(NSDictionary *)dict { } - (NSDictionary *)toMap { return [NSDictionary - dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId", - (self.volume ? self.volume : [NSNull null]), @"volume", nil]; + dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]), + @"textureId", (self.volume != nil ? self.volume : [NSNull null]), + @"volume", nil]; } @end @@ -165,8 +167,9 @@ + (FLTPlaybackSpeedMessage *)fromMap:(NSDictionary *)dict { } - (NSDictionary *)toMap { return [NSDictionary - dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId", - (self.speed ? self.speed : [NSNull null]), @"speed", nil]; + dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]), + @"textureId", (self.speed != nil ? self.speed : [NSNull null]), + @"speed", nil]; } @end @@ -185,9 +188,10 @@ + (FLTPositionMessage *)fromMap:(NSDictionary *)dict { } - (NSDictionary *)toMap { return [NSDictionary - dictionaryWithObjectsAndKeys:(self.textureId ? self.textureId : [NSNull null]), @"textureId", - (self.position ? self.position : [NSNull null]), @"position", - nil]; + dictionaryWithObjectsAndKeys:(self.textureId != nil ? self.textureId : [NSNull null]), + @"textureId", + (self.position != nil ? self.position : [NSNull null]), + @"position", nil]; } @end @@ -202,7 +206,7 @@ + (FLTMixWithOthersMessage *)fromMap:(NSDictionary *)dict { } - (NSDictionary *)toMap { return [NSDictionary - dictionaryWithObjectsAndKeys:(self.mixWithOthers ? self.mixWithOthers : [NSNull null]), + dictionaryWithObjectsAndKeys:(self.mixWithOthers != nil ? self.mixWithOthers : [NSNull null]), @"mixWithOthers", nil]; } @end diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 6261a1dea6e1..c716e54927fa 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -1,7 +1,7 @@ name: video_player description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. -version: 2.1.2 +version: 2.1.3 homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player flutter: