import 'package:flutter/material.dart';

class AccessibilityField extends StatelessWidget {
  final Function(String?) onSaved;

  const AccessibilityField({Key? key, required this.onSaved}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TextFormField(
      decoration: const InputDecoration(
        labelText: 'Accessibilité',
        border: OutlineInputBorder(),
        filled: true,
        fillColor: Colors.white,
      ),
      validator: (value) {
        if (value == null || value.isEmpty) {
          return 'Veuillez entrer des informations sur l\'accessibilité';
        }
        return null;
      },
      onSaved: onSaved,
    );
  }
}
