Showing
2 changed files
with
8 additions
and
5 deletions
| @@ -87,8 +87,7 @@ class Barcode { | @@ -87,8 +87,7 @@ class Barcode { | ||
| 87 | rawBytes = data['rawBytes'] as Uint8List?, | 87 | rawBytes = data['rawBytes'] as Uint8List?, |
| 88 | rawValue = data['rawValue'] as String?, | 88 | rawValue = data['rawValue'] as String?, |
| 89 | type = BarcodeType.values[data['type'] as int], | 89 | type = BarcodeType.values[data['type'] as int], |
| 90 | - calendarEvent = | ||
| 91 | - toCalendarEvent(data['calendarEvent'] as Map?), | 90 | + calendarEvent = toCalendarEvent(data['calendarEvent'] as Map?), |
| 92 | contactInfo = toContactInfo(data['contactInfo'] as Map?), | 91 | contactInfo = toContactInfo(data['contactInfo'] as Map?), |
| 93 | driverLicense = toDriverLicense(data['driverLicense'] as Map?), | 92 | driverLicense = toDriverLicense(data['driverLicense'] as Map?), |
| 94 | email = toEmail(data['email'] as Map?), | 93 | email = toEmail(data['email'] as Map?), |
| @@ -139,8 +138,12 @@ class CalendarEvent { | @@ -139,8 +138,12 @@ class CalendarEvent { | ||
| 139 | /// Create a [CalendarEvent] from native data. | 138 | /// Create a [CalendarEvent] from native data. |
| 140 | CalendarEvent.fromNative(Map data) | 139 | CalendarEvent.fromNative(Map data) |
| 141 | : description = data['description'] as String?, | 140 | : description = data['description'] as String?, |
| 142 | - start = data['start'] != null ? DateTime.tryParse(data['start'] as String) : null, | ||
| 143 | - end = data['end'] != null ? DateTime.tryParse(data['end'] as String) : null, | 141 | + start = data['start'] != null |
| 142 | + ? DateTime.tryParse(data['start'] as String) | ||
| 143 | + : null, | ||
| 144 | + end = data['end'] != null | ||
| 145 | + ? DateTime.tryParse(data['end'] as String) | ||
| 146 | + : null, | ||
| 144 | location = data['location'] as String?, | 147 | location = data['location'] as String?, |
| 145 | organizer = data['organizer'] as String?, | 148 | organizer = data['organizer'] as String?, |
| 146 | status = data['status'] as String?, | 149 | status = data['status'] as String?, |
| @@ -10,7 +10,7 @@ Size toSize(Map data) { | @@ -10,7 +10,7 @@ Size toSize(Map data) { | ||
| 10 | List<Offset>? toCorners(List? data) { | 10 | List<Offset>? toCorners(List? data) { |
| 11 | if (data != null) { | 11 | if (data != null) { |
| 12 | return List.unmodifiable( | 12 | return List.unmodifiable( |
| 13 | - data.map((e ) => Offset((e as Map)['x'] as double, e['y'] as double)), | 13 | + data.map((e) => Offset((e as Map)['x'] as double, e['y'] as double)), |
| 14 | ); | 14 | ); |
| 15 | } else { | 15 | } else { |
| 16 | return null; | 16 | return null; |
-
Please register or login to post a comment