setLocales method

Future<void> setLocales (
  1. List<Locale> locales
)

Artificially calls dispatchLocalesChanged on the Widget binding, then flushes microtasks.

Implementation

Future<void> setLocales(List<Locale> locales) {
  return TestAsyncUtils.guard<void>(() async {
    assert(inTest);
    dispatchLocalesChanged(locales);
  });
}