validaciones de inputs
This commit is contained in:
@@ -450,7 +450,6 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
String profession = _profession.toString();
|
||||
double _space = 10;
|
||||
|
||||
@@ -493,6 +492,12 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
TextFormField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: _cedulaController,
|
||||
validator: (String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Ingrese una cedula válida';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
hintText: 'Cedula (Obligatorio)'),
|
||||
@@ -638,13 +643,47 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 40, right: 40, top: 40, bottom: 0),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFD6F4FF),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 5,
|
||||
offset: const Offset(1, 3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
size: 27,
|
||||
color: Colors.black54,
|
||||
),
|
||||
SizedBox(width: 15),
|
||||
Text(
|
||||
'Para añadir mas de una especialidad, \nenvie mas fotos y separe por comas (,).',
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
margin: const EdgeInsets.only(
|
||||
top: 80, right: 70, left: 70, bottom: 30),
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
sendInfo();
|
||||
if (_formKey.currentState!.validate()) {
|
||||
sendInfo();
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF2BA4EC),
|
||||
|
||||
Reference in New Issue
Block a user