isValid method

  1. @override
Future<bool> isValid(
  1. bool fromAppStartup
)
override

If the trigger is valid or not. @param fromAppStartup If the check has been triggered at the app startup @returns If the trigger is valid or not.

Implementation

@override
Future<bool> isValid(bool fromAppStartup) async {
  if (completionDate == null) {
    return false;
  }
  return completionDate!.isBefore(DateTime.now());
}