title: The argument type 'void Function(String?)?' can't be assigned to the parameter type 'String? Function(String?)? in Flutter
body: <p><strong>The Code:</strong></p>
  <pre><code>import 'package:flutter/cupertino.dart';
  import 'package:flutter/material.dart';
  
  class CustomTextFormField extends StatelessWidget {
    final String hintText;
    final Color color;
    final Color fillColor;
    final void Function(String?)? onSave;
    final void Function(String?)? validator;
  
    const CustomTextFormField({
       this.hintText = &quot;&quot;,
       this.color = Colors.black,
       this.fillColor = Colors.grey,
       this.onSave ,
       this.validator,
    });
  
    @override
    Widget build(BuildContext context) {
      return Container(
        child: TextFormField(
          onSaved: onSave,
          validator: validator,
          decoration: InputDecoration(
            hintText: hintText,
            hintStyle: TextStyle(
              color: color,
            ),
            fillColor: fillColor,
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>The Problem:
  The argument type 'void Function(String?)?' can't be assigned to the parameter type 'String? Function(String?)?'</p>
  <p>Q: Why there an error at this point below:
  <em><strong>validator: validator</strong></em></p>