update static method

void update(
  1. ResponsiveData data
)

Updates the global responsive data. This is called automatically by ScalifyProvider.

Implementation

static void update(ResponsiveData data) {
  // Optimization #2: Safety check for debug mode
  assert(() {
    final binding = WidgetsBinding.instance;
    // Only check phase if binding is initialized
    // This ensures we are not updating global state during a locked frame phase unnecessarily
    if (binding.schedulerPhase == SchedulerPhase.idle ||
        binding.schedulerPhase == SchedulerPhase.postFrameCallbacks) {
      // Safe zones
    }
    return true;
  }());

  _data = data;
}