import 'package:flutter/material.dart';

class ParticipationFeeField extends StatelessWidget {

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

  @override
  Widget build(BuildContext context) {
    return TextFormField(
      decoration: const InputDecoration(
        labelText: 'Frais de participation',
        border: OutlineInputBorder(),
        filled: true,
        fillColor: Colors.white,
      ),
      keyboardType: TextInputType.number,
      validator: (value) {
        if (value == null || value.isEmpty) {
          return 'Veuillez entrer les frais de participation';
        }
        return null;
      },
      onSaved: onSaved,
    );
  }
}
