@@ -221,27 +221,14 @@ class SentryDevice {
221
221
222
222
/// Produces a [Map] that can be serialized to JSON.
223
223
Map <String , dynamic > toJson () {
224
- String ? orientation;
225
-
226
- switch (this .orientation) {
227
- case SentryOrientation .portrait:
228
- orientation = 'portait' ;
229
- break ;
230
- case SentryOrientation .landscape:
231
- orientation = 'landscape' ;
232
- break ;
233
- case null :
234
- orientation = null ;
235
- break ;
236
- }
237
224
return < String , dynamic > {
238
225
if (name != null ) 'name' : name,
239
226
if (family != null ) 'family' : family,
240
227
if (model != null ) 'model' : model,
241
228
if (modelId != null ) 'model_id' : modelId,
242
229
if (arch != null ) 'arch' : arch,
243
230
if (batteryLevel != null ) 'battery_level' : batteryLevel,
244
- if (orientation != null ) 'orientation' : orientation,
231
+ if (orientation != null ) 'orientation' : orientation! .name ,
245
232
if (manufacturer != null ) 'manufacturer' : manufacturer,
246
233
if (brand != null ) 'brand' : brand,
247
234
if (screenWidthPixels != null ) 'screen_width_pixels' : screenWidthPixels,
0 commit comments