Skip to content

Commit

Permalink
Merge pull request #280 from takenet/develop
Browse files Browse the repository at this point in the history
Release 0.2.3
  • Loading branch information
githubdoandre authored Sep 13, 2024
2 parents 48dfc03 + ecf0609 commit 6cb64b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.3

- [DSPhoneInput] Add support to select current country code.

## 0.2.2

- [DSButton] Removed border color when `borderColor` property is not informed.
Expand Down
1 change: 1 addition & 0 deletions lib/blip_ds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export 'src/extensions/ds_delivery_report_status.extension.dart'
show DSDeliveryReportStatusExtension;
export 'src/extensions/ds_string.extension.dart' show DSStringExtension;
export 'src/models/ds_calls_media_message.model.dart' show DSCallsMediaMessage;
export 'src/models/ds_country.model.dart' show DSCountry;
export 'src/models/ds_message_bubble_avatar_config.model.dart'
show DSMessageBubbleAvatarConfig;
export 'src/models/ds_message_bubble_style.model.dart'
Expand Down
7 changes: 6 additions & 1 deletion lib/src/widgets/fields/ds_phone_input.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class DSPhoneInput extends StatefulWidget {
this.errorText,
this.onChanged,
this.shouldFocus = false,
this.initialCountry,
});

final TextEditingController controller;
Expand All @@ -36,6 +37,7 @@ class DSPhoneInput extends StatefulWidget {
final ValueChanged<String>? onChanged;
final bool shouldFocus;
final void Function(DSCountry)? onChangeCountry;
final DSCountry? initialCountry;

@override
State<DSPhoneInput> createState() => _DSPhoneInputState();
Expand Down Expand Up @@ -65,7 +67,10 @@ class _DSPhoneInputState extends State<DSPhoneInput> {
_borderColor.value = _color();
});

DSBottomSheetCountries.selectedCountry.value = null;
_dropdownValue.value =
widget.initialCountry ?? (DSUtils.countriesList.first);

DSBottomSheetCountries.selectedCountry.value = widget.initialCountry;
widget.onChangeCountry?.call(_dropdownValue.value);
}

Expand Down
10 changes: 5 additions & 5 deletions lib/src/widgets/utils/ds_bottomsheet_countries.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ abstract class DSBottomSheetCountries {
),
DSIconButton(
onPressed: () {
Get.back(
result: selectedCountry.value,
);
Get.back();
},
icon: const Icon(DSIcons.close_outline,
color: DSColors.neutralDarkRooftop),
icon: const Icon(
DSIcons.close_outline,
color: DSColors.neutralDarkRooftop,
),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: blip_ds
description: Blip Design System for Flutter.
version: 0.2.2
version: 0.2.3
homepage: https://github.com/takenet/blip-ds-flutter#readme
repository: https://github.com/takenet/blip-ds-flutter

Expand Down

0 comments on commit 6cb64b3

Please sign in to comment.