ElementLocator.fromJson constructor
ElementLocator.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ElementLocator.fromJson(Map<String, dynamic> json) => ElementLocator(
id: json['id']?.toString(),
text: json['text'] is List
? (json['text'] as List).map((value) => value.toString()).toList()
: json['text']?.toString(),
label: json['label']?.toString(),
role: json['role']?.toString(),
within: json['within'] is Map
? ElementLocator.fromJson(
Map<String, dynamic>.from(json['within'] as Map),
)
: null,
occurrence: json['occurrence'] as int?,
bounds: json['bounds'] is Map
? ElementBounds.fromJson(
Map<String, dynamic>.from(json['bounds'] as Map),
)
: null,
);