Skip to content

Commit

Permalink
Component phone input (#24)
Browse files Browse the repository at this point in the history
* chore: update contributing

* fix: Fix button group immutability (#1)

* Fix errors

* fix copywith function

* [automated commit] lint format and import sort

---------

Co-authored-by: Osman <[email protected]>
Co-authored-by: github-actions <[email protected]>

* [automated commit] lint format and import sort

* update on-main to push to firebase (#3)

* ci: move firebase to flutter main host for qa (#4)

* feat: Add List Item (#5)

* feat: Add List Item

* [automated commit] lint format and import sort

---------

Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: github-actions <[email protected]>

* fix(main): ListItem disabled color (#8)

* fix(main): ListItem disabled color

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* feat : Dropdown menu (#7)

* Create dropdown

* Add sizes

* create stoyrybook and add size

* Fix errrs and respond to comments

* Fix issues

* [automated commit] lint format and import sort

* Alter isLarge

* Fix spacing

* [automated commit] lint format and import sort

* Alter leading styles

* [automated commit] lint format and import sort

---------

Co-authored-by: Osman <[email protected]>
Co-authored-by: github-actions <[email protected]>

* Component ZetaSwitch (#6)

* create ZetaSwitch

* ZetaSwitch using MaterialSwitch

* widgetbook for ZetaSwitch

* remove hover; fix initState

* add showHover parameter

* add comments 'Zeta change' in material_switch.dart

* remove size parameter and factory constructors

* fix example and widgetbook

* Component Zeta Radio Button (#9)

* create component Zeta Radio Button

* remove hover color

* fix label line height

* feat(main): SnackBar (#10)

* add snackbar example

* Add snackbar widgetbook

* feat(main): SnackBar

* [automated commit] lint format and import sort

* remove view icon

* Add view icon

* Add widgetbook icon helper

* [automated commit] lint format and import sort

* fix alphabetical imports

* Fix delete and error background color

---------

Co-authored-by: github-actions <[email protected]>

* feat(main): Tabs (#11)

* feat(main): Tabs

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* chore: Update text styles (#13)

* fix: switch on web (#14)

* Component date input (#12)

* create ZetaDateInput

* create different ZetaDateInput variants

* fix show error style

* date validation and input mask; documentation for ZetaDateInput properties

* create widgetbook

* changes according to comments

* Component date input (#16)

* create ZetaDateInput

* create different ZetaDateInput variants

* fix show error style

* date validation and input mask; documentation for ZetaDateInput properties

* create widgetbook

* changes according to comments

* fix Typography of Date Input

* restore

* remove text line height

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

---------

Co-authored-by: Luke <[email protected]>
Co-authored-by: ahmed-osman3 <[email protected]>
Co-authored-by: Osman <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>
  • Loading branch information
8 people committed Apr 25, 2024
1 parent e3df5f1 commit e421095
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Widget phoneInputUseCase(BuildContext context) {
label: 'Phone number',
hint: 'Enter your phone number',
countries: countries.isEmpty ? null : countries.toUpperCase().split(','),
useRootNavigator: false,
),
);
},
Expand Down
7 changes: 6 additions & 1 deletion lib/src/components/phone_input/phone_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ZetaPhoneInput extends StatefulWidget {
this.countryDialCode,
this.phoneNumber,
this.countries,
this.useRootNavigator = true,
});

/// If provided, displays a label above the input field.
Expand Down Expand Up @@ -55,6 +56,9 @@ class ZetaPhoneInput extends StatefulWidget {
/// List of countries ISO 3166-1 alpha-2 codes
final List<String>? countries;

/// Determines if the root navigator should be used in the [CountriesDialog].
final bool useRootNavigator;

@override
State<ZetaPhoneInput> createState() => _ZetaPhoneInputState();
@override
Expand All @@ -70,7 +74,8 @@ class ZetaPhoneInput extends StatefulWidget {
..add(ObjectFlagProperty<void Function(Map<String, String>? p1)?>.has('onChanged', onChanged))
..add(StringProperty('countryDialCode', countryDialCode))
..add(StringProperty('phoneNumber', phoneNumber))
..add(IterableProperty<String>('countries', countries));
..add(IterableProperty<String>('countries', countries))
..add(DiagnosticsProperty<bool>('useRootNavigator', useRootNavigator));
}
}

Expand Down

0 comments on commit e421095

Please sign in to comment.