@@ -18,18 +18,6 @@ class SentryApp {
1818 this .deviceAppHash,
1919 });
2020
21- factory SentryApp .fromJson (Map <String , dynamic > data) => SentryApp (
22- name: data['app_name' ],
23- version: data['app_version' ],
24- identifier: data['app_identifier' ],
25- build: data['app_build' ],
26- buildType: data['build_type' ],
27- startTime: data['app_start_time' ] != null
28- ? DateTime .tryParse (data['app_start_time' ])
29- : null ,
30- deviceAppHash: data['device_app_hash' ],
31- );
32-
3321 /// Human readable application name, as it appears on the platform.
3422 final String ? name;
3523
@@ -51,6 +39,19 @@ class SentryApp {
5139 /// Application specific device identifier.
5240 final String ? deviceAppHash;
5341
42+ /// Deserializes a [SentryApp] from JSON [Map] .
43+ factory SentryApp .fromJson (Map <String , dynamic > data) => SentryApp (
44+ name: data['app_name' ],
45+ version: data['app_version' ],
46+ identifier: data['app_identifier' ],
47+ build: data['app_build' ],
48+ buildType: data['build_type' ],
49+ startTime: data['app_start_time' ] != null
50+ ? DateTime .tryParse (data['app_start_time' ])
51+ : null ,
52+ deviceAppHash: data['device_app_hash' ],
53+ );
54+
5455 /// Produces a [Map] that can be serialized to JSON.
5556 Map <String , dynamic > toJson () {
5657 final json = < String , String > {};
0 commit comments