fieldFocusChange function Null safety

dynamic fieldFocusChange(
  1. BuildContext context,
  2. {required FocusNode currentFocus,
  3. required FocusNode? nextFocus}
)

Implementation

fieldFocusChange(BuildContext context,
    {required FocusNode currentFocus, required FocusNode? nextFocus}) {
  currentFocus.unfocus();
  FocusScope.of(context).requestFocus(nextFocus);
}