updateScreenSize method

void updateScreenSize(
  1. Size newSize
)

Atualiza o tamanho da tela atual (reativo)

Implementation

void updateScreenSize(Size newSize) {
  if (_currentScreenSize != newSize) {
    _currentScreenSize = newSize;

    // ✅ Log da dimensão apenas quando mudar
    // log('📱 Screen Size: ${newSize.width.toInt()}×${newSize.height.toInt()}', name: 'FLUTTER_SCALE');

    if (_type == ScaleType.dimension) {
      // ✅ NOVO: Verifica threshold antes de notificar
      if (_shouldNotifyScaleChange()) {
        _lastNotifiedScale = scale; // Atualiza a última escala notificada
        notifyListeners();
      }
    }
  }
}