Motion constructor

Motion({
  1. required ResourceType type,
  2. required String id,
  3. String idV1 = "",
  4. required Relative owner,
  5. required bool isEnabled,
  6. required bool hasMotion,
  7. required bool isValidMotion,
})

Creates a Motion object.

Implementation

Motion({
  required super.type,
  required super.id,
  this.idV1 = "",
  required this.owner,
  required this.isEnabled,
  required this.hasMotion,
  required this.isValidMotion,
})  : assert(idV1.isEmpty || Validators.isValidIdV1(idV1),
          '"$idV1" is not a valid `idV1`'),
      _originalIsEnabled = isEnabled;