read method

  1. @override
Device read(
  1. DartObject object
)
override

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,
  );
}