serialize method Null safety

  1. @mustCallSuper
Map<String, String> serialize()

Serializes this command to parameter name/value pairs.

Implementation

@mustCallSuper
Map<String, String> serialize() {
  final Map<String, String> result = <String, String>{
    'command': kind,
  };
  if (timeout != null) {
    result['timeout'] = '${timeout!.inMilliseconds}';
  }
  return result;
}