startAutoAdjustments method

void startAutoAdjustments({
  1. Duration interval = const Duration(seconds: 30),
})

Start automatic layout adjustments

Implementation

void startAutoAdjustments({Duration interval = const Duration(seconds: 30)}) {
  if (_autoAdjustEnabled) return;

  _autoAdjustEnabled = true;

  // Set up a timer to periodically evaluate rules
  _timer = Timer.periodic(interval, (_) async {
    await evaluateAndApplyRules();
  });

  // Listen for interactions to count for rule evaluation
  _tracker.addListener(_onInteraction);
}