toJson method
Implementation
Map<String, dynamic> toJson() => {
'connectionState': connectionState.wire,
if (device != null) 'device': device!.toJson(),
'transactionInProgress': transactionInProgress,
if (batteryPercent != null) 'batteryPercent': batteryPercent,
if (vendor != null) 'vendor': vendor!.wire,
if (driverId != null) 'driverId': driverId,
if (profile != null) 'profile': profile!.toJson(),
if (capabilities != null) 'capabilities': capabilities!.toJson(),
if (reconnectState != null) 'reconnectState': reconnectState!.wire,
if (reconnectAttempt != null) 'reconnectAttempt': reconnectAttempt,
if (reconnectEnabled != null) 'reconnectEnabled': reconnectEnabled,
if (lastReconnectErrorCode != null) 'lastReconnectErrorCode': lastReconnectErrorCode,
if (retryQueueStatus != null) 'retryQueueStatus': retryQueueStatus!.toJson(),
};