onNotifyActivator method

void onNotifyActivator(
  1. dynamic data, {
  2. bool recheck = false,
  3. VoidCallback? callback,
})

Implementation

void onNotifyActivator(
  dynamic data, {
  bool recheck = false,
  VoidCallback? callback,
}) async {
  if (onActivator != null) {
    onNotifyWithCallback(() => indicatorVisible = true);
    bool value = await onActivator!(recheck, data);
    onNotifyWithCallback(() {
      activated = value;
      indicatorVisible = false;
    });
  } else {
    if (callback != null) callback();
  }
}