SentryApp.fromJson constructor
SentryApp.fromJson(
- Map<String, dynamic> data
)
Deserializes a SentryApp from JSON Map.
Implementation
factory SentryApp.fromJson(Map<String, dynamic> data) {
final viewNamesJson = data['view_names'] as List<dynamic>?;
return SentryApp(
name: data['app_name'],
version: data['app_version'],
identifier: data['app_identifier'],
build: data['app_build'],
buildType: data['build_type'],
startTime: data['app_start_time'] != null
? DateTime.tryParse(data['app_start_time'])
: null,
deviceAppHash: data['device_app_hash'],
appMemory: data['app_memory'],
inForeground: data['in_foreground'],
viewNames: viewNamesJson?.map((e) => e as String).toList(),
textScale: data['text_scale'],
);
}