setLocales method Null safety
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);
});
}