Artificially calls dispatchLocaleChanged on the Widget binding, then flushes microtasks.
Source
Future<Null> setLocale(String languageCode, String countryCode) { return TestAsyncUtils.guard(() async { assert(inTest); Locale locale = new Locale(languageCode, countryCode); dispatchLocaleChanged(locale); return null; }); }