LiveCare Phone Call type Mobile number edit field disabled as per Mr Rwaid's instructions.

merge-update-with-lab-changes
haroon amjad 7 months ago
parent a0528da4cd
commit f7599a47e7

@ -118,6 +118,7 @@ class _LiveCareCallTypeSelectPageState extends State<LiveCareCallTypeSelectPage>
},
mobileNo: this.mobileNo,
isLiveCareTypeSelect: true,
isEnable: false,
),
],
),

@ -14,7 +14,9 @@ class PhoneNumberSelectorWidget extends StatefulWidget {
final Function? onCountryChange;
final String? mobileNo;
bool isLiveCareTypeSelect;
PhoneNumberSelectorWidget({Key? key, this.onNumberChange, this.onCountryChange, this.mobileNo, this.isLiveCareTypeSelect = false}) : super(key: key);
bool isEnable;
PhoneNumberSelectorWidget({Key? key, this.onNumberChange, this.onCountryChange, this.mobileNo, this.isLiveCareTypeSelect = false, this.isEnable = true}) : super(key: key);
@override
_PhoneNumberSelectorWidgetState createState() {
@ -28,6 +30,7 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
List<Countries> counties = [];
ProjectViewModel? projectProvider;
TextEditingController textController = new TextEditingController();
@override
void initState() {
for (var element in countriesData) counties.add(Countries.fromJson(element));
@ -44,7 +47,7 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
String? countryName = "";
if(widget.isLiveCareTypeSelect) {
if (widget.isLiveCareTypeSelect) {
textController.text = Utils.getPhoneNumberWithoutZero(widget.mobileNo!);
}
for (var element in counties) {
@ -55,9 +58,9 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
return Column(
children: [
inputWidget(TranslationBase.of(context).country, countryName!, isEnable: false, hasSelection: true),
inputWidget(TranslationBase.of(context).country, countryName!, isEnable: true, hasSelection: true),
SizedBox(height: 12),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).phoneNumber, widget.mobileNo ?? "5xxxxxxxx", prefix: countryCode)),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).phoneNumber, isEnable: widget.isEnable, widget.mobileNo ?? "5xxxxxxxx", prefix: countryCode)),
],
);
}
@ -178,6 +181,7 @@ class _MobileNo extends State<MobileNo> {
String countryCode = '+966';
List<Countries> counties = [];
ProjectViewModel? projectProvider;
@override
void initState() {
countriesData.forEach((element) {

Loading…
Cancel
Save