toMap method

Map<String, dynamic> toMap()

Return a map representation of this error suitable for conversion to json.

Implementation

Map<String, dynamic> toMap() => <String, Object?>{
      'code': code,
      'message': message,
      if (data != null) 'data': data,
    };