You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a suggestion to save some pain on the initial set-up for intermediate developers like myself. The localizationsDelegates inside the MaterialApp needs to include both GlobalMaterialLocalizations.delegate, and GlobalWidgetsLocalizations.delegate. To access these, this import is needed: import 'package:flutter_localizations/flutter_localizations.dart'. Heres the problem. To access flutter_localizations, it needs to be imported into the pubspec file. But it's not a separate package so can't be found on pub.dev (I now know that it's part of the core dart language) But it still has to be imported like this: dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
It's taken me over an hour to figure this out, so maybe you could include this step in the set-up documentation to help others like me please.
Thanks for a great package. I'm looking forward to hooking it up now it's initialised!
The text was updated successfully, but these errors were encountered:
Just a suggestion to save some pain on the initial set-up for intermediate developers like myself. The localizationsDelegates inside the MaterialApp needs to include both GlobalMaterialLocalizations.delegate, and GlobalWidgetsLocalizations.delegate. To access these, this import is needed: import 'package:flutter_localizations/flutter_localizations.dart'. Heres the problem. To access flutter_localizations, it needs to be imported into the pubspec file. But it's not a separate package so can't be found on pub.dev (I now know that it's part of the core dart language) But it still has to be imported like this: dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
It's taken me over an hour to figure this out, so maybe you could include this step in the set-up documentation to help others like me please.
Thanks for a great package. I'm looking forward to hooking it up now it's initialised!
The text was updated successfully, but these errors were encountered: