Key<T> constructor

Key<T>(
  1. Key parent,
  2. Type? type,
  3. T? id
)

Implementation

Key(Key parent, this.type, this.id) : _parent = parent {
  if (type == null) {
    throw ArgumentError('The type argument must not be null.');
  }
  if (id != null && id is! String && id is! int) {
    throw ArgumentError('The id argument must be an integer or a String.');
  }
}