Resource constructor

Resource({
  1. required ResourceType type,
  2. required String id,
})

Creates a Resource object.

Implementation

Resource({
  required this.type,
  required this.id,
})  : assert(id.isEmpty || Validators.isValidId(id),
          '"$id" is not a valid `id`'),
      _originalType = type;