import 'package:flutter/material.dart';

class LinkField extends StatelessWidget {
  final FormFieldSetter<String> onSaved;

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

  @override
  Widget build(BuildContext context) {
    return TextFormField(
      decoration: InputDecoration(
        labelText: 'Lien (optionnel)',
        labelStyle: const TextStyle(color: Colors.white70),
        filled: true,
        fillColor: Colors.white.withOpacity(0.1),
        border: const OutlineInputBorder(
          borderRadius: BorderRadius.all(Radius.circular(10.0)),
          borderSide: BorderSide.none,
        ),
        prefixIcon: const Icon(Icons.link, color: Colors.white70),
      ),
      style: const TextStyle(color: Colors.white),
      onSaved: onSaved,
    );
  }
}
