The problem that I'm having is that at the bottom Fields the keyboard covers the Fields which I'm working with so I can't see what I'm typing as you can see in these pictures:
As an example see the field called: "Cita"
And once selected:
Finally here is my code, is there something in it that is making this behavior happen.
Center(
child: TextButton.icon(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
enableDrag: true,
elevation: 100,
builder: (BuildContext context) {
return StatefulBuilder(builder:
(context, modalSetState) {
return Container(
padding: const EdgeInsets
.symmetric(
horizontal: 7,
vertical: 1,
),
margin: const EdgeInsets.only(
left: 7,
right: 7,
top: 5,
bottom: 15,
),
child: Form(
key: _form,
child: ListView(
shrinkWrap: true,
children: [
Padding(
padding:
const EdgeInsets
.symmetric(
vertical: 5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
Text(
'Introdusca Detalles de Culto',
style:
TextStyle(
fontWeight:
FontWeight
.bold,
fontSize: 20,
),
),
Divider(
color: Colors
.black,
thickness: 1.00,
),
],
),
),
Padding(
padding:
const EdgeInsets
.symmetric(
vertical: 5,
horizontal: 5,
),
child: DateTimeField(
format: dateFormat,
style: TextStyle(
color:
Colors.black,
),
decoration:
InputDecoration(
labelText:
'Fecha',
labelStyle:
TextStyle(
color: Colors
.black,
fontWeight:
FontWeight
.bold,
),
enabledBorder:
OutlineInputBorder(
borderSide:
BorderSide(
color: Colors
.black,
),
),
),
cursorColor:
Colors.black,
onShowPicker: (context,
currentValue) async {
final date =
await showDatePicker(
context:
context,
firstDate:
DateTime(
1900),
initialDate:
currentValue ??
DateTime
.now(),
lastDate:
DateTime(
2100),
);
if (date !=
null) {
final time =
TimeOfDay(
hour: 7,
minute:
0);
return DateTimeField
.combine(
date,
time);
} else {
return currentValue;
}
},
validator: (value) {
if (value ==
null) {
return 'Porfavor Introduzca una Fecha';
}
return null;
},
onSaved: (value) {
modalSetState(() {
fecha = value;
});
},
),
),
Padding(
padding:
const EdgeInsets
.all(5),
child: TextFormField(
cursorColor:
Colors.black,
style: TextStyle(
color:
Colors.black,
),
//initialValue: _hasData ? street : null,
decoration:
InputDecoration(
labelText:
'Horario',
labelStyle:
TextStyle(
color: Colors
.black,
fontWeight:
FontWeight
.bold,
),
enabledBorder:
OutlineInputBorder(
borderSide:
BorderSide(
color: Colors
.black,
),
),
),
// onFieldSubmitted: (_) {
// FocusScope.of(context).requestFocus(_street2Focus);
// },
validator: (value) {
if (value
.isEmpty) {
return 'Porfavor Introduzca un Horario';
}
return null;
},
onSaved: (value) {
modalSetState(() {
horario = value;
});
},
),
),
Padding(
padding:
const EdgeInsets
.all(5),
child: TextFormField(
cursorColor:
Colors.black,
style: TextStyle(
color:
Colors.black,
),
//initialValue: _hasData ? street : null,
decoration:
InputDecoration(
labelText:
'Pastor',
labelStyle:
TextStyle(
color: Colors
.black,
fontWeight:
FontWeight
.bold,
),
enabledBorder:
OutlineInputBorder(
borderSide:
BorderSide(
color: Colors
.black,
),
),
),
// onFieldSubmitted: (_) {
// FocusScope.of(context).requestFocus(_street2Focus);
// },
validator: (value) {
if (value
.isEmpty) {
return 'Porfavor Introduzca el nombre del Pastor';
}
return null;
},
onSaved: (value) {
modalSetState(() {
pastor = value;
});
},
),
),
Padding(
padding:
const EdgeInsets
.all(5),
child: TextFormField(
cursorColor:
Colors.black,
style: TextStyle(
color:
Colors.black,
),
//initialValue: _hasData ? street : null,
decoration:
InputDecoration(
labelText:
'Iglesia',
labelStyle:
TextStyle(
color: Colors
.black,
fontWeight:
FontWeight
.bold,
),
enabledBorder:
OutlineInputBorder(
borderSide:
BorderSide(
color: Colors
.black,
),
),
),
// onFieldSubmitted: (_) {
// FocusScope.of(context).requestFocus(_street2Focus);
// },
validator: (value) {
if (value
.isEmpty) {
return 'Porfavor Introduzca nombre de la Iglesia';
}
return null;
},
onSaved: (value) {
modalSetState(() {
iglesia = value;
});
},
),
),
Padding(
padding:
const EdgeInsets
.all(5),
child: TextFormField(
cursorColor:
Colors.black,
style: TextStyle(
color:
Colors.black,
),
//initialValue: _hasData ? street : null,
decoration:
InputDecoration(
labelText: 'Cita',
labelStyle:
TextStyle(
color: Colors
.black,
fontWeight:
FontWeight
.bold,
),
enabledBorder:
OutlineInputBorder(
borderSide:
BorderSide(
color: Colors
.black,
),
),
),
// onFieldSubmitted: (_) {
// FocusScope.of(context).requestFocus(_street2Focus);
// },
validator: (value) {
if (value
.isEmpty) {
return 'Porfavor Introduzca la Cita Principal';
}
return null;
},
onSaved: (value) {
modalSetState(() {
cita = value;
});
},
),
),
],
),
),
);
});
},
);
Kind Regards.