detailsAsMessages property

List<ProtoMessage> get detailsAsMessages

Return the list of details with the list elements converted to ProtoMessage instances.

If an element isn't a known error detail type then Any is returned for that element.

The known message error types are:

For more information see https://google.aip.dev/193 and https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto.

Implementation

List<ProtoMessage> get detailsAsMessages {
  return details.map((any) {
    final decoder = _decoders[any.typeName];
    return decoder == null ? any : any.unpackFrom(decoder);
  }).toList();
}