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

Release 0.2.3 #280

Merged
merged 3 commits into from
Sep 13, 2024
Merged
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
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
Loading