cast<C> method

Attribute<C> cast<C>()

Implementation

Attribute<C> cast<C>() {
  assert(value == null || value is C);
  return value == null
      ? Attribute<C>(path!.cast<C>(), null,
          source: source, clearErrors: clearErrors)
      : Attribute<C>(path!.cast<C>(), value as C?,
          source: source, clearErrors: clearErrors);
}