dispatch method Null safety
- EngineNotification notification
override
Play sound file when all conditions are matched
Implementation
@override
Future<void> dispatch(EngineNotification notification) async {
final matches = await hasSpeech(notification);
if (matches.isEmpty) return;
await HapticFeedback.vibrate();
for (final match in matches) {
if (match.files.isEmpty) continue;
Get.log('[$runtimeType] Playing files ${match.files}');
player.addFiles(match.files);
}
}