I want to add a custom language to date picker that not supported by flutter localizations. How can I add a custom locale? I only want to change the words in datepicker.
Future<void> presentDatePicker(ctx) async {
await DatePicker.showDatePicker(
ctx,
showTitleActions: true,
minTime: DateTime(2020, 1, 1),
maxTime: DateTime(2021, 12, 31),
currentTime: DateTime.now(),
).then((pickedDate) {
if (pickedDate == null) {
return;
} else {
viewDate = pickedDate;
choosenDate = DateFormat('yyyy-MM-dd').format(pickedDate);
print(choosenDate);
}
notifyListeners();
});
}