Skip to content

Commit

Permalink
Merge pull request #319 from Rochak69/master
Browse files Browse the repository at this point in the history
pass magnifier configuration in construction
  • Loading branch information
marcaureln authored Oct 15, 2023
2 parents 19f7409 + 75e4407 commit 23340be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/intl_phone_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ class IntlPhoneField extends StatefulWidget {
//enable the autofill hint for phone number
final bool disableAutoFillHints;

/// If null, default magnification configuration will be used.
final TextMagnifierConfiguration? magnifierConfiguration;

const IntlPhoneField({
Key? key,
this.formFieldKey,
Expand Down Expand Up @@ -292,6 +295,7 @@ class IntlPhoneField extends StatefulWidget {
this.showCursor = true,
this.pickerDialogStyle,
this.flagsButtonMargin = EdgeInsets.zero,
this.magnifierConfiguration,
}) : super(key: key);

@override
Expand Down Expand Up @@ -394,6 +398,7 @@ class _IntlPhoneFieldState extends State<IntlPhoneField> {
cursorWidth: widget.cursorWidth,
showCursor: widget.showCursor,
onFieldSubmitted: widget.onSubmitted,
magnifierConfiguration: widget.magnifierConfiguration,
decoration: widget.decoration.copyWith(
prefixIcon: _buildFlagsButton(),
counterText: !widget.enabled ? '' : null,
Expand Down

0 comments on commit 23340be

Please sign in to comment.