I would like to change the language from english to french in show date picker, Please find below the code i am using and one like which supposed to solve that but it makes the code not working for this part:
new Step(
title: new Text("Quelle est la date de 1er immatriculation?"),
content: Column(
children: <Widget>[
Text(_datetime == null ? "Vous n'avez pas encore choisi de date" : _datetime.toString().substring(0, 10)),
RaisedButton(
child: Text('choisissez une date'),
onPressed: () {
showDatePicker(context: context,
locale : const Locale("fr","FR"),//this line making the code not working too
builder: (BuildContext context, Widget child) {
return Theme(
data: ThemeData.fallback(),
child: child,
);
},
// locale: const Locale('eu', 'FR'),
initialDate: DateTime.now(),
firstDate: DateTime(1920),
lastDate: DateTime(2100),
).then((date) {
setState(() {
_datetime = date;
});
});
}
),
],
),
isActive: _currentStep >= 0,
state:
_currentStep >= 2 ? StepState.complete : StepState.disabled,
),