FancyInput constructor

FancyInput({
  1. required String id,
  2. required List<String? Function()> rules(
    1. String value
    ),
  3. TextEditingController? controller,
  4. String? mask,
  5. TextInputType? keyboardType,
  6. List<TextInputFormatter>? inputFormatters,
})

Creates a FancyInput instance with the provided properties. If no controller is provided, a new TextEditingController is created.

Implementation

FancyInput({
  required this.id,
  required this.rules,
  TextEditingController? controller,
  this.mask,
  this.keyboardType,
  this.inputFormatters,
}) {
  // Initialize the controller, either from the provided one or create a new instance.
  this.controller = controller ?? TextEditingController();
}