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.s

Implementation

@override
Future<bool> isValid(bool fromAppStartup) async {
  if (!fromAppStartup) {
    return false;
  }
  int currentSession = await MBAudience.currentSession;
  return currentSession >= times;
}