updateLocale method

Future<void> updateLocale(
  1. Locale l
)

Asynchronously updates the application locale and forces an update.

Implementation

Future<void> updateLocale(Locale l) async {
  // Set the new locale for the application
  Get.locale = l;
  // Force an update to ensure that the locale change takes effect immediately
  await forceAppUpdate();
}