ContentBlockResource.fromMap constructor

ContentBlockResource.fromMap(
  1. Map<Object?, Object?> value
)

Implementation

factory ContentBlockResource.fromMap(Map<Object?, Object?> value) {
  final decoded = ContentBlock.fromMap(value);
  if (decoded is! ContentBlockResource) {
    throw const AcpWireDecodeException('Expected ContentBlockResource.');
  }
  return decoded;
}