Scroll.deserialize constructor
- Map<
String, String> json, - DeserializeFinderFactory finderFactory, {
- String? path,
Deserializes this command from the value generated by serialize.
Implementation
Scroll.deserialize(super.json, super.finderFactory, {super.path})
: dx = json.containsKey('dx')
? double.parse(json['dx']!)
: throw ArgumentError.notNull(path == null ? 'dx' : '$path.dx'),
dy = json.containsKey('dy')
? double.parse(json['dy']!)
: throw ArgumentError.notNull(path == null ? 'dy' : '$path.dy'),
duration = json.containsKey('duration')
? Duration(microseconds: int.parse(json['duration']!))
: throw ArgumentError.notNull(path == null ? 'duration' : '$path.duration'),
frequency = json.containsKey('frequency')
? int.parse(json['frequency']!)
: throw ArgumentError.notNull(path == null ? 'frequency' : '$path.frequency'),
super.deserialize();