How do you use the localization delegate. Type `Set<LocalizationDelegate<dynamic>>` cannot be assigned to `LocalizationDelegate<dynamic>`
Lionapi opened this issue · 2 comments
Lionapi commented
cedvdb commented
Notice PhoneFieldLocalization.delegates
is plural. Replace line 106 to 111 with:
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
...PhoneFieldLocalization.delegates
],
as said in the other issue. You can read about the dart spread operator in dart doc https://dart.dev/language/collections#:~:text=Spread%20operators,-%23&text=Dart%20supports%20the%20spread%20operator,multiple%20values%20into%20a%20collection.&text=For%20more%20details%20and%20examples,see%20the%20spread%20operator%20proposal.
Lionapi commented
Thanks a lot. It's working now you can close this issue.