File tree 3 files changed +3
-4
lines changed
platform_tests/test_plugin
3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -193,8 +193,7 @@ import FlutterMacOS
193
193
} else if (! hostDatatype.isBuiltin &&
194
194
customEnumNames.contains (field.type.baseName)) {
195
195
indent.writeln ('var ${field .name }: $fieldType ? = nil' );
196
- indent.write (
197
- 'if let ${field .name }RawValue = nullToNil(value: $listValue ) as! Int? ' );
196
+ indent.write ('if let ${field .name }RawValue = $listValue as! Int? ' );
198
197
indent.addScoped ('{' , '}' , () {
199
198
indent.writeln (
200
199
'${field .name } = $fieldType (rawValue: ${field .name }RawValue)' );
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ struct AllNullableTypes {
145
145
let nullableMapWithAnnotations = ( list [ 11 ] is NSNull ) ? nullToNil ( value: list [ 11 ] ) as! [ String ? : String ? ] ? : list [ 11 ] as! [ String ? : String ? ] ?
146
146
let nullableMapWithObject = ( list [ 12 ] is NSNull ) ? nullToNil ( value: list [ 12 ] ) as! [ String ? : Any ? ] ? : list [ 12 ] as! [ String ? : Any ? ] ?
147
147
var aNullableEnum : AnEnum ? = nil
148
- if let aNullableEnumRawValue = nullToNil ( value : list [ 13 ] ) as! Int ? {
148
+ if let aNullableEnumRawValue = list [ 13 ] as! Int ? {
149
149
aNullableEnum = AnEnum ( rawValue: aNullableEnumRawValue)
150
150
}
151
151
let aNullableString = ( list [ 14 ] is NSNull ) ? nullToNil ( value: list [ 14 ] ) as! String ? : list [ 14 ] as! String ?
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ struct AllNullableTypes {
145
145
let nullableMapWithAnnotations = ( list [ 11 ] is NSNull ) ? nullToNil ( value: list [ 11 ] ) as! [ String ? : String ? ] ? : list [ 11 ] as! [ String ? : String ? ] ?
146
146
let nullableMapWithObject = ( list [ 12 ] is NSNull ) ? nullToNil ( value: list [ 12 ] ) as! [ String ? : Any ? ] ? : list [ 12 ] as! [ String ? : Any ? ] ?
147
147
var aNullableEnum : AnEnum ? = nil
148
- if let aNullableEnumRawValue = nullToNil ( value : list [ 13 ] ) as! Int ? {
148
+ if let aNullableEnumRawValue = list [ 13 ] as! Int ? {
149
149
aNullableEnum = AnEnum ( rawValue: aNullableEnumRawValue)
150
150
}
151
151
let aNullableString = ( list [ 14 ] is NSNull ) ? nullToNil ( value: list [ 14 ] ) as! String ? : list [ 14 ] as! String ?
You can’t perform that action at this time.
0 commit comments