Comments (13)
Same error with Flutter 1.9.1+hotfix.6. Updating SharedPreferences not fixed this.
from easy_localization.
Error is in saveLocale() function... in if statemente :/
Here is fix
from easy_localization.
I updated here, but it could not find the EasylocaLizationDelegate... I figured out the problem and is the class name, that changed from "EasylocaLizationDelegate" to "EasyLocalizationDelegate"... (notice the uppercase L position). Everything is fine now.
from easy_localization.
Same error on Flutter Channel master, v1.12.3-pre.10
from easy_localization.
Glad to hear about that! Hope the package at pub.dev be updated soon.
from easy_localization.
@pulstar it's ready
enjoying
from easy_localization.
I am experiencing the same problem, but my device language is correct.
E/flutter ( 5394): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: 'dart:ui/window.dart': Failed assertion: line 281: '': is not true.
E/flutter ( 5394): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)
E/flutter ( 5394): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
E/flutter ( 5394): #2 new Locale (dart:ui/window.dart:281:15)
E/flutter ( 5394): #3 _EasyLocalizationState.saveLocale. (package:easy_localization/easy_localization_provider.dart:58:24)
E/flutter ( 5394): #4 State.setState (package:flutter/src/widgets/framework.dart:1141:30)
E/flutter ( 5394): #5 _EasyLocalizationState.saveLocale (package:easy_localization/easy_localization_provider.dart:57:7)
E/flutter ( 5394):
E/flutter ( 5394): #6 _EasyLocalizationState.initState (package:easy_localization/easy_localization_provider.dart:36:5)
E/flutter ( 5394): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4068:58)
E/flutter ( 5394): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
E/flutter ( 5394): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
E/flutter ( 5394): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
E/flutter ( 5394): #11 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:998:16)
E/flutter ( 5394): #12 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:969:5)
E/flutter ( 5394): #13 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:915:17)
E/flutter ( 5394): #14 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2328:19)
E/flutter ( 5394): #15 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:914:13)
E/flutter ( 5394): #16 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:795:7)
E/flutter ( 5394): #17 runApp (package:flutter/src/widgets/binding.dart:845:7)
E/flutter ( 5394): #18 main (package:bargainer_pro/main.dart:29:3)
E/flutter ( 5394): #19 _runMainZoned.. (dart:ui/hooks.dart:229:25)
E/flutter ( 5394): #20 _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 5394): #21 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 5394): #22 _runZoned (dart:async/zone.dart:1516:10)
E/flutter ( 5394): #23 runZoned (dart:async/zone.dart:1500:12)
E/flutter ( 5394): #24 _runMainZoned. (dart:ui/hooks.dart:221:5)
E/flutter ( 5394): #25 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:19)
E/flutter ( 5394): #26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
from easy_localization.
This problem have something to do with SharedPreferences plug-in. I updated it to the version ^0.5.4+5 and removed the line below from my main.dart file. This solved the problem above.
SharedPreferences.setMockInitialValues({});
from easy_localization.
Looks like smth happens during creation of new Locale
from easy_localization.
Any updates here? Guys, who faced same problem, can I send my app to prod with this error?
from easy_localization.
|| allowed _codeLang to be null and _codeCoun was set to some value.. Replace || with && and i added extra measure _codeLang != '' to fullfill assert in Locale constructor...
from easy_localization.
I Fix it like this. but it is not a best solution if you don't have default lang
from easy_localization.
damfrg
solution worked for me , but I don't know Why ?
from easy_localization.
Related Issues (20)
- Find unused translation keys
- How to use in isolate? HOT 1
- Triggering Easy Localization Package on iOS Language Change
- Using plural(0) count as other HOT 6
- BottomNavigationBarItem lable not change the language HOT 2
- Need callback finish EasyLocalization -> Load asset from assets/translations
- How can i create custom locals for unsupported langauges?
- How to change default "DateFormat('d').format" format HOT 1
- intl 0.19.0 doesn't work with easy_localizaiton version 3.0.5 HOT 10
- Missing features about easy localization HOT 1
- You are antisemitic HOT 6
- French translation Special Cahracters are not displayed correctly HOT 1
- How to set mutiple language for mutiple package in project?
- context.setLocale reverse to previous language with Easy localization HOT 1
- [Feature Request] ARB support for localization
- [Feature Request]: Support namespaces / multiple files per language
- resetLocal crashes if deviceLocale not in supportedLocales HOT 2
- ignore_for_file: constant_identifier_names when generate locale_keys.g.dart
- Localization not working on physical device
- strict countryCode problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy_localization.