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!
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!