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

[BUG] Locale data has not been initialized #109

Open
LuuPNH opened this issue Jun 15, 2023 · 5 comments
Open

[BUG] Locale data has not been initialized #109

LuuPNH opened this issue Jun 15, 2023 · 5 comments

Comments

@LuuPNH
Copy link

LuuPNH commented Jun 15, 2023

Error in app: image
Throw source:
image

  • Manual Fix:
    • When start flutter pub run intl_utils:generate, will generate /intl/messages_all.dart
    • In this file, line 40 we have a Future initializeMessages
    • Add async on this Future
  • How to fix that?
@lzoran
Copy link
Collaborator

lzoran commented Jun 15, 2023

It appears that date formatting might have been triggered in your code prior to the completion of your localization delegates.

You might find the guide and the sample app useful for gaining more clarity. If these resources don't help you, could you provide an example that can be reproduced? It will make it easier to diagnose the underlying issue.

@AndrewBert
Copy link

I need to do the same manual fix after upgrading to the latest version of flutter.

@lzoran
Copy link
Collaborator

lzoran commented Jun 21, 2023

I've created a new Flutter project and integrated the required localization code as outlined in the guide and demonstrated in the sample app. Everything seems to work as expected.

However, to be able to provide any further assistance, I need more detailed information about the problem you're experiencing. A reproducible example of the issue would be a great starting point.

Test environment: Windows 11, Flutter 3.10.5, intl_utils 2.8.3, Flutter Intl 1.18.3-2022.2.

@couturmi
Copy link

I've created a new Flutter project and integrated the required localization code as outlined in the guide and demonstrated in the sample app. Everything seems to work as expected.

@lzoran We are seeing this issue on Flutter 3.10.5. Can you confirm this is the version you are using?

@lzoran
Copy link
Collaborator

lzoran commented Jun 21, 2023

@couturmi

@lzoran We are seeing this issue on Flutter 3.10.5. Can you confirm this is the version you are using?

Yes.

Flutter 3.10.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 796c8ef792 (8 days ago) • 2023-06-13 15:51:02 -0700
Engine • revision 45f6e00911
Tools • Dart 3.0.5 • DevTools 2.23.1

This is the sample app I've used to try to reproduce the issue. As I said, everything works fine on my machine. 😕

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

4 participants