Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError: The method 'containsKey' was called on null (.Easy Localization) #381

Closed
MuhammadSufyanMalik opened this issue May 3, 2021 · 1 comment

Comments

@MuhammadSufyanMalik
Copy link

MuhammadSufyanMalik commented May 3, 2021

if I run on the ios platform I got the below error, whereas there is no error on the android platform.
Below is the console output of the error.

Launching lib/main.dart on iPod touch (7th generation) in debug mode...
lib/main.dart:1
Xcode build done. 34.9s
Connecting to VM Service at ws://127.0.0.1:51398/Yrw7tsntuls=/ws
[Easy Localization] Start
[Easy Localization] Init state
[Easy Localization] Build
[Easy Localization] Device locale en
[Easy Localization] Init Localization Delegate
[Easy Localization] Init provider
[Easy Localization] Load Localization Delegate

════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building Body(dirty, dependencies: [MediaQuery]):
The method 'containsKey' was called on null.
Receiver: null
Tried calling: containsKey("parent_btn")

The relevant error-causing widget was
Body
lib/…/registration/RegistrationOptions.dart:9
When the exception was thrown, this was the stack
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 Translations.isNestedKey
package:easy_localization/src/translations.dart:40
#2 Translations.get
package:easy_localization/src/translations.dart:7
#3 Localization._resolve
package:easy_localization/src/localization.dart:138
#4 Localization.tr
package:easy_localization/src/localization.dart:46
...

@MuhammadSufyanMalik MuhammadSufyanMalik changed the title NoSuchMethodError: The method 'containsKey' was called on null (.Easy Localization) if i run on ios platform there is no error on android platform. NoSuchMethodError: The method 'containsKey' was called on null (.Easy Localization) May 3, 2021
@MuhammadSufyanMalik
Copy link
Author

Error resolved, by adding Languages json separately.

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

No branches or pull requests

1 participant