import 'package:flutter/material.dart';

class SecurityProtocolField extends StatelessWidget {

  const SecurityProtocolField({required this.onSaved, super.key});
  final Function(String?) onSaved;

  @override
  Widget build(BuildContext context) {
    return TextFormField(
      decoration: const InputDecoration(
        labelText: 'Protocole de sécurité',
        border: OutlineInputBorder(),
        filled: true,
        fillColor: Colors.white,
      ),
      validator: (value) {
        if (value == null || value.isEmpty) {
          return 'Veuillez entrer un protocole de sécurité';
        }
        return null;
      },
      onSaved: onSaved,
    );
  }
}
