diff --git a/lib/src/phone_form_field.dart b/lib/src/phone_form_field.dart index 308a7ff..d99756d 100644 --- a/lib/src/phone_form_field.dart +++ b/lib/src/phone_form_field.dart @@ -78,8 +78,8 @@ class PhoneFormField extends FormField { final bool enableSuggestions; final Widget Function(BuildContext, EditableTextState)? contextMenuBuilder; final bool? showCursor; - final VoidCallback? onEditingComplete; - final ValueChanged? onSubmitted; + final Function()? onEditingComplete; + final Function(PhoneNumber)? onSubmitted; final AppPrivateCommandCallback? onAppPrivateCommand; final Function(PointerDownEvent)? onTapOutside; final double cursorWidth; diff --git a/lib/src/phone_form_field_state.dart b/lib/src/phone_form_field_state.dart index d5bc69a..184a4c4 100644 --- a/lib/src/phone_form_field_state.dart +++ b/lib/src/phone_form_field_state.dart @@ -117,6 +117,7 @@ class PhoneFormFieldState extends FormFieldState { enableSuggestions: widget.enableSuggestions, showCursor: widget.showCursor, onEditingComplete: widget.onEditingComplete, + onSubmitted: (_) => widget.onSubmitted?.call(controller.value), onAppPrivateCommand: widget.onAppPrivateCommand, cursorWidth: widget.cursorWidth, cursorHeight: widget.cursorHeight,