Skip to content

Commit 8660a1f

Browse files
authored
Merge pull request #838 from mahendra-918/fixed-orderedCountryCode
the orderedCountryCode function is placed outside of the controller a…
2 parents 07bb6e0 + b5bc71b commit 8660a1f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/app/modules/addOrUpdateAlarm/controllers/add_or_update_alarm_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,6 @@ class AddOrUpdateAlarmController extends GetxController {
15451545
: selectedTime.value.hour.toString()));
15461546
inputMinutesController.text = selectedTime.value.minute.toString().padLeft(2, '0');
15471547
}
1548-
}
15491548

15501549
int orderedCountryCode(Country countryA, Country countryB) {
15511550
// `??` for null safety of 'dialCode'
@@ -1554,6 +1553,7 @@ class AddOrUpdateAlarmController extends GetxController {
15541553

15551554
return int.parse(dialCodeA).compareTo(int.parse(dialCodeB));
15561555
}
1556+
}
15571557

15581558
class LimitRange extends TextInputFormatter {
15591559
LimitRange(this.minRange, this.maxRange) : assert(minRange < maxRange);

lib/app/modules/addOrUpdateAlarm/views/guardian_angel.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ class GuardianAngel extends StatelessWidget {
4545
onInputChanged: (value) {},
4646
onInputValidated: (value) {},
4747
spaceBetweenSelectorAndTextField: 0,
48-
selectorConfig: const SelectorConfig(
48+
selectorConfig: SelectorConfig(
4949
showFlags: true,
5050
setSelectorButtonAsPrefixIcon: true,
5151
leadingPadding: 0,
5252
trailingSpace: false,
53-
countryComparator: orderedCountryCode,
53+
countryComparator: controller.orderedCountryCode,
5454
),
5555
),
5656
),

0 commit comments

Comments
 (0)