toJson method
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'id': id,
'role': role,
if (label.isNotEmpty) 'label': label,
if (identifier.isNotEmpty) 'identifier': identifier,
if (value.isNotEmpty) 'value': value,
if (hint.isNotEmpty) 'hint': hint,
if (state.isNotEmpty) 'state': List<String>.from(state),
if (actions.isNotEmpty) 'actions': List<String>.from(actions),
'rect': List<int>.from(rect),
if (scroll != null && scroll!.isNotEmpty)
'scroll': Map<String, int>.from(scroll!),
};