[flutter_tools] For l10n with deferred loading, use loadLibrary for non-web too (#59539)

After Dart VM change we are now required to use loadLibrary on an import whenever it is imported as deferred.

See: https://dart-review.googlesource.com/c/sdk/+/149613
This commit is contained in:
Per Classon
2020-06-16 22:36:28 +02:00
committed by GitHub
parent 61c198e766
commit 56a7dacd46
3 changed files with 6 additions and 18 deletions

View File

@@ -94,7 +94,7 @@ class Home extends StatelessWidget {
final List<String> results = [];
return Row(
children: <Widget>[
ResultBuilder(
LocaleBuilder(
test: 'supportedLocales',
callback: (BuildContext context) {
results.add('--- supportedLocales tests ---');
@@ -254,8 +254,8 @@ class Home extends StatelessWidget {
]);
},
),
Builder(
builder: (BuildContext context) {
LocaleBuilder(
callback: (BuildContext context) {
try {
int n = 0;
for (final String result in results) {