toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => <String, Object?>{
      'type': type,
      'index': index ?? -1,
      'name': name ?? '',
      'messageObjectId': messageObjectId ?? '',
      'size': size ?? -1,
      if (handler?.toJson() case final handlerValue?) 'handler': handlerValue,
      if (location?.toJson() case final locationValue?)
        'location': locationValue,
    };