date_time_picker icon indicating copy to clipboard operation
date_time_picker copied to clipboard

Locale data has not been initialized

Open mandar-bhide opened this issue 3 years ago • 5 comments

E/flutter (16941): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: LocaleDataException: Locale data has not been initialized, call initializeDateFormatting(). E/flutter (16941): #0 UninitializedLocaleData._throwException package:intl/src/intl_helpers.dart:80 E/flutter (16941): #1 UninitializedLocaleData.containsKey package:intl/src/intl_helpers.dart:74 E/flutter (16941): #2 DateFormat.localeExists package:intl/…/intl/date_format.dart:834 E/flutter (16941): #3 verifiedLocale package:intl/src/intl_helpers.dart:159 E/flutter (16941): #4 new DateFormat package:intl/…/intl/date_format.dart:266 E/flutter (16941): #5 _DateTimePickerState.set12HourTimeValues package:date_time_picker/date_time_picker.dart:762 E/flutter (16941): #6 _DateTimePickerState._showDateTimePickerDialog package:date_time_picker/date_time_picker.dart:875 E/flutter (16941): E/flutter (16941):

mandar-bhide avatar Sep 11 '21 11:09 mandar-bhide

no fix for this ????

crushman1 avatar Oct 15 '21 23:10 crushman1

This is a real issue

Ikxyz avatar Oct 28 '21 23:10 Ikxyz

any updates?

Levyks avatar Jan 16 '22 01:01 Levyks

any updates??

rajatKumar023 avatar Feb 09 '22 06:02 rajatKumar023

What I did to get around it was use locale: Localizations.localeOf(context), on the DateTimePicker widget, and also call initializeDateFormatting(); in the initState of the widget that contains the DateTimePicker.

CHB61 avatar Mar 05 '22 15:03 CHB61