match method Null safety
- EngineNotification notification,
- SpeechCondition condition
Matches a notification
to type and run
Implementation
Future<bool> match(
EngineNotification notification, SpeechCondition condition) async {
// Stop if the type not in notification or condition
if (notification.type != type || condition.type != type) return false;
// Ensure not expired
if (isExpired(notification)) return false;
// TODO: Check if layer allowed
// Check if condition for current run mode
return checkRunMode(condition);
}