jeanmatthieud / flutter_firebase_auth_ui

BSD 2-Clause "Simplified" License
3 stars 1 forks source link

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

Open MarcelEdward opened 4 years ago

MarcelEdward commented 4 years ago

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 commented 4 years ago

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

jeanmatthieud commented 4 years ago

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 commented 4 years ago

Bummer, not everyone uses 'I18n' for localization.

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