3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Flutter】Locale data has not been initialized, call initializeDateFormatting(<locale>). の解決

Posted at

error内容

Locale data has not been initialized, call initializeDateFormatting(<locale>). 

これは言語情報の初期化がされていないとのこと。

DateFormat.MMMM('id')

上記のようにlocale情報を扱う前には、'initializeDateFormatting'を呼び出す必要があるとのことです。

対応

アプリの初期起動時のmain()処理内に以下を追記して対応しました。

initializeDateFormatting('id'); //locale情報は各々変更してください。

参考文献

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?