How can I use optional parameters in given code of dart? when I remove the required keyword it shows error
class CustomInput extends StatelessWidget {
final String hintText;
final Function onChanged;
final Function onSubmitted;
final FocusNode focusedNode;
final TextInputAction textInputAction;
CustomInput({ required this.hintText,
required this.onChanged,
required this.onSubmitted,
required this.focusedNode,
required this.textInputAction});
}
I want to use different parameters of that class in different custom inputs like some parameters in Email field and some in Password field but it require all parameters for both...