I'm using bottom picker but I can't assign the Spanish language since it doesn't support it. How could I assign the dates to the Spanish language?, I want the months to appear in Spanish.
void _selectDate(BuildContext context) {
final screenHeight = MediaQuery.of(context).size.height;
final screenWidth = MediaQuery.of(context).size.width;
BottomPicker.date(
pickerTitle: Text(
"Fecha de nacimiento",
style: TextStyle(fontSize: screenWidth * 0.037),
),
pickerDescription: SizedBox(
height: screenHeight * 0.03,
),
initialDateTime: DateTime.now(),
minDateTime: DateTime(1900),
maxDateTime: DateTime.now(),
pickerTextStyle: TextStyle(fontSize: screenWidth * 0.050),
onSubmit: (selectedDate) {
setState(() {
_dateOfBirthController.text = DateFormat('yyyy-MM-dd').format(selectedDate);
});
},
onCloseButtonPressed: () {
print("Picker cerrado");
},
displayCloseIcon: true,
buttonContent: const Icon(Icons.check, color: Colors.white),
buttonStyle: BoxDecoration(
color: Color(0xFF0886B5),
borderRadius: BorderRadius.circular(12),
),
buttonWidth: 50,
buttonPadding: 10,
).show(context);
}