title: how to create a TextFormField function in flutter
body: <p>TextFormField function in flutter
  A FormField that contains a TextField.
  This is a convenience widget that wraps a TextField widget in a FormField.</p>
  <pre><code>static formField({
      required String label,
      String? initialValue,
      FormFieldSetter? onSaved,
      ValueChanged? onChanged,
      Icon? icon,
      int? maxLines,
      TextEditingController? controller,
      TextInputType? keyboard,
    }) {
      return Padding(
        padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 8),
        child: TextFormField(
          validator: (value) {
            if (value!.isEmpty) {
              return 'please type the $label above';
            }
          },
          initialValue: initialValue,
          controller: controller,
          maxLines: maxLines,
          onChanged: onChanged,
          onSaved: onSaved,
          keyboardType: keyboard,
          decoration: InputDecoration(
            label: Text(label),
            prefixIcon: icon,
            hintText: 'Type $label here',
            border: const OutlineInputBorder(),
          ),
        ),
      );
    }
  </code></pre>