Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

type 'DefaultWidgetsLocalizations' is not a subtype of type 'I18n' in type cast #2

Open
MarcelEdward opened this issue Jan 29, 2020 · 3 comments

Comments

@MarcelEdward
Copy link

The following _CastError was thrown building _SignInPage(dirty, dependencies: [_LocalizationsScope-[GlobalKey#5eb8a]], state: _SignInPageState#2a7e1):
type 'DefaultWidgetsLocalizations' is not a subtype of type 'I18n' in type cast

The relevant error-causing widget was:
SignInEmailPasswordPage /lib/auth/authentication.dart:115:16
When the exception was thrown, this was the stack:
#0 _LocalizationsState.resourcesFor (package:flutter/src/widgets/localizations.dart:538:48)
#1 Localizations.of (package:flutter/src/widgets/localizations.dart:450:39)
#2 I18n.of (package:flutter_firebase_auth_ui/generated/i18n.dart:29:57)
#3 _SignInPageState.build (package:flutter_firebase_auth_ui/src/signin_email_password_page.dart:74:22)
#4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4407:27)

@willowsokora
Copy link

I'm also having this issue @jeanmatthieud can you maybe add an example to the repository because the examples in readme are incomplete

@jeanmatthieud
Copy link
Owner

Hi,

I'm sorry for the delay. I took a lot of time to take this lib to the next level. Sadly, someone stole my PC before I pushed the modifications.
I still want to work on it, but I don't have the need to right now.

@MarcelEdward2
Copy link

Bummer, not everyone uses 'I18n' for localization.

I copied the dart files in my project and replaced 'I18n' with a custom localisation system

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants