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

Border And Fill Color #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.2.0"
version: "3.3.0"
matcher:
dependency: transitive
description:
Expand Down
18 changes: 18 additions & 0 deletions lib/intl_phone_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ class IntlPhoneField extends StatefulWidget {
/// The TextFormField key.
final GlobalKey<FormFieldState>? formFieldKey;

/// Border for the input
final InputBorder? border;

/// Prefix Dropdown Constraintss
final BoxConstraints? prefixIconConstraints;

/// Text Form Field fill Color
final Color? fillColor;

/// Whether to hide the text being edited (e.g., for passwords).
final bool obscureText;

Expand Down Expand Up @@ -267,6 +276,9 @@ class IntlPhoneField extends StatefulWidget {
this.decoration = const InputDecoration(),
this.style,
this.dropdownTextStyle,
this.border,
this.fillColor,
this.prefixIconConstraints,
this.onSubmitted,
this.validator,
this.onChanged,
Expand Down Expand Up @@ -402,6 +414,12 @@ class _IntlPhoneFieldState extends State<IntlPhoneField> {
decoration: widget.decoration.copyWith(
prefixIcon: _buildFlagsButton(),
counterText: !widget.enabled ? '' : null,
border: widget.border,
enabledBorder: widget.border,
focusedBorder: widget.border,
prefixIconConstraints: widget.prefixIconConstraints,
filled: widget.fillColor != null,
fillColor: widget.fillColor,
),
style: widget.style,
onSaved: (value) {
Expand Down