fix localization tests

This commit is contained in:
Salvatore Giordano
2022-05-03 15:44:03 +02:00
parent 7f562d3ee8
commit 075f9414de
3 changed files with 9 additions and 8 deletions
@@ -166,8 +166,8 @@ void main() {
final Key textKey = UniqueKey();
await tester.pumpWidget(buildFrame(
delegates: <LocalizationsDelegate<StreamChatLocalizations>>[
GlobalStreamChatLocalizations.delegate,
delegates: <LocalizationsDelegate>[
...GlobalStreamChatLocalizations.delegates,
const FooStreamChatLocalizationsDelegate(
supportedLanguage: 'fr',
launchUrlError: "Impossible de lancer l'url",
@@ -217,10 +217,11 @@ void main() {
// Accept whatever locale we're given
localeResolutionCallback:
(Locale? locale, Iterable<Locale> supportedLocales) => locale,
delegates: <FooStreamChatLocalizationsDelegate>[
delegates: [
const FooStreamChatLocalizationsDelegate(
supportedLanguage: 'allLanguages',
),
...GlobalStreamChatLocalizations.delegates,
],
buildContent: (BuildContext context) {
// Should always be 'foo', no matter what the locale is