toJson method

Map<String, Object?> toJson()

Encodes this mutation as JSON-compatible data.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
  'key': key.toJson(),
  'state': state,
  if (scope != null) 'scope': scope,
  if (meta.isNotEmpty) 'meta': meta,
};