-
Notifications
You must be signed in to change notification settings - Fork 125
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
Locale functionality doesn't run properly #20
Comments
I also have this problem. |
same problem |
1 similar comment
same problem |
config MaterialLocalizations can solve this problem 1.pubspec.yaml add dependencies
3 date_range_picker then it can work |
|
Hello,
When I fill up locale variable with a location different to Locale('en') I've run into an issue:
I/flutter ( 5182): When the exception was thrown, this was the stack:
I/flutter ( 5182): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
I/flutter ( 5182): #1 _DatePickerDialogState.didChangeDependencies
package:date_range_picker/date_range_picker.dart:1033
Localizations variable in date_range_picker.dart file is null.
If I change Locale('fr') to Locale('en') localizations variable is not null and all run properly.
Code:
final List picked = await DateRangePicker.showDatePicker(
context: context,
initialFirstDate: DateTime.now(),
initialLastDate: (DateTime.now()).add(Duration(days: 2)),
firstDate: (DateTime.now()).subtract(Duration(days: 1)),
lastDate: (DateTime.now()).add(Duration(days: 365)),
locale: Locale('fr')
);
Any way around this?
Thanks.
The text was updated successfully, but these errors were encountered: