Showing
1 changed file
with
11 additions
and
4 deletions
| @@ -92,7 +92,8 @@ class Barcode { | @@ -92,7 +92,8 @@ class Barcode { | ||
| 92 | 92 | ||
| 93 | /// Create a [Barcode] from native data. | 93 | /// Create a [Barcode] from native data. |
| 94 | Barcode.fromNative(Map data) | 94 | Barcode.fromNative(Map data) |
| 95 | - : corners = toCorners((data['corners'] as List?)?.cast<Map<Object?, Object?>>()), | 95 | + : corners = toCorners( |
| 96 | + (data['corners'] as List?)?.cast<Map<Object?, Object?>>()), | ||
| 96 | format = toFormat(data['format'] as int), | 97 | format = toFormat(data['format'] as int), |
| 97 | rawBytes = data['rawBytes'] as Uint8List?, | 98 | rawBytes = data['rawBytes'] as Uint8List?, |
| 98 | rawValue = data['rawValue'] as String?, | 99 | rawValue = data['rawValue'] as String?, |
| @@ -149,8 +150,12 @@ class CalendarEvent { | @@ -149,8 +150,12 @@ class CalendarEvent { | ||
| 149 | /// Create a [CalendarEvent] from native data. | 150 | /// Create a [CalendarEvent] from native data. |
| 150 | CalendarEvent.fromNative(Map data) | 151 | CalendarEvent.fromNative(Map data) |
| 151 | : description = data['description'] as String?, | 152 | : description = data['description'] as String?, |
| 152 | - start = data['start'] != null ? DateTime.tryParse(data['start'] as String) : null, | ||
| 153 | - end = data['end'] != null ? DateTime.tryParse(data['end'] as String) : null, | 153 | + start = data['start'] != null |
| 154 | + ? DateTime.tryParse(data['start'] as String) | ||
| 155 | + : null, | ||
| 156 | + end = data['end'] != null | ||
| 157 | + ? DateTime.tryParse(data['end'] as String) | ||
| 158 | + : null, | ||
| 154 | location = data['location'] as String?, | 159 | location = data['location'] as String?, |
| 155 | organizer = data['organizer'] as String?, | 160 | organizer = data['organizer'] as String?, |
| 156 | status = data['status'] as String?, | 161 | status = data['status'] as String?, |
| @@ -197,7 +202,9 @@ class ContactInfo { | @@ -197,7 +202,9 @@ class ContactInfo { | ||
| 197 | /// Create a [ContactInfo] from native data. | 202 | /// Create a [ContactInfo] from native data. |
| 198 | ContactInfo.fromNative(Map data) | 203 | ContactInfo.fromNative(Map data) |
| 199 | : addresses = List.unmodifiable( | 204 | : addresses = List.unmodifiable( |
| 200 | - (data['addresses'] as List? ?? []).cast<Map>().map(Address.fromNative), | 205 | + (data['addresses'] as List? ?? []) |
| 206 | + .cast<Map>() | ||
| 207 | + .map(Address.fromNative), | ||
| 201 | ), | 208 | ), |
| 202 | emails = List.unmodifiable( | 209 | emails = List.unmodifiable( |
| 203 | (data['emails'] as List? ?? []).cast<Map>().map(Email.fromNative), | 210 | (data['emails'] as List? ?? []).cast<Map>().map(Email.fromNative), |
-
Please register or login to post a comment