DeviceCommand constructor

DeviceCommand({
  1. String? id,
  2. required dynamic payload,
  3. DateTime? timestamp,
  4. required String type,
})

Implementation

DeviceCommand({
  String? id,
  required this.payload,
  DateTime? timestamp,
  required this.type,
})  : id = id ?? const Uuid().v4(),
      timestamp = timestamp ?? DateTime.now();