match method Null safety
- EngineNotification notification,
- SpeechCondition condition
Matches a notification
against a condition
Implementation
Future<bool> match(
EngineNotification notification, SpeechCondition condition) async {
// No match if audio is muted
if (EngineSettingsController.instance.item.muteAudio) return false;
for (final matcher in registry) {
try {
if (await matcher.match(notification, condition)) {
return true;
}
} on Exception {
return false;
}
}
// No match found
return false;
}