Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass magnifier configuration in construction #319

Merged
merged 2 commits into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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