read method
Parses object
into ReadType
Implementation
@override
Device read(DartObject object) {
final name = object.getField('name')!.toStringValue()!;
final type = deviceTypeReader.read(
object.getField('type')!,
);
final resolution = resolutioReader.read(
object.getField('resolution')!,
);
return Device(
name: name,
resolution: resolution,
type: type,
);
}