|
|
|
@ -14,24 +14,29 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/dropdown/country_dropdown_widget.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/dropdown/country_dropdown_widget.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class FamilyFileAddWidget extends StatelessWidget {
|
|
|
|
class FamilyFileAddWidget extends StatefulWidget {
|
|
|
|
final Function()? onVerificationPress;
|
|
|
|
final Function()? onVerificationPress;
|
|
|
|
final String message;
|
|
|
|
final String message;
|
|
|
|
|
|
|
|
|
|
|
|
const FamilyFileAddWidget(this.onVerificationPress, this.message, {super.key});
|
|
|
|
const FamilyFileAddWidget(this.onVerificationPress, this.message, {super.key});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
State<FamilyFileAddWidget> createState() => _FamilyFileAddWidgetState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _FamilyFileAddWidgetState extends State<FamilyFileAddWidget> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
AuthenticationViewModel authVm = getIt.get<AuthenticationViewModel>();
|
|
|
|
AuthenticationViewModel authVm = getIt.get<AuthenticationViewModel>();
|
|
|
|
MedicalFileViewModel? medicalVM = getIt.get<MedicalFileViewModel>();
|
|
|
|
|
|
|
|
// TODO: implement build
|
|
|
|
// TODO: implement build
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
message.toText16(color: AppColors.textColor, weight: FontWeight.w500),
|
|
|
|
widget.message.toText16(color: AppColors.textColor, weight: FontWeight.w500),
|
|
|
|
SizedBox(height: 20.h),
|
|
|
|
SizedBox(height: 20.h),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
|
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
|
|
|
|
@ -59,12 +64,15 @@ class FamilyFileAddWidget extends StatelessWidget {
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
).paddingOnly(top: 8.h, bottom: 8.h),
|
|
|
|
).paddingOnly(top: 8.h, bottom: 8.h),
|
|
|
|
Divider(height: 1.h, color: AppColors.spacerLineColor),
|
|
|
|
Divider(height: 1.h, color: AppColors.spacerLineColor),
|
|
|
|
TextInputWidget(
|
|
|
|
Selector<AuthenticationViewModel, String>(
|
|
|
|
|
|
|
|
selector: (_, model) => model.selectedCountrySignup.countryCode,
|
|
|
|
|
|
|
|
builder: (context, countryCode, child) {
|
|
|
|
|
|
|
|
return TextInputWidget(
|
|
|
|
labelText: LocaleKeys.phoneNumber.tr(),
|
|
|
|
labelText: LocaleKeys.phoneNumber.tr(),
|
|
|
|
hintText: "",
|
|
|
|
hintText: "",
|
|
|
|
controller: authVm.phoneNumberController,
|
|
|
|
controller: authVm.phoneNumberController,
|
|
|
|
isEnable: true,
|
|
|
|
isEnable: true,
|
|
|
|
prefix: authVm.selectedCountrySignup.countryCode,
|
|
|
|
prefix: countryCode,
|
|
|
|
isAllowRadius: true,
|
|
|
|
isAllowRadius: true,
|
|
|
|
isBorderAllowed: false,
|
|
|
|
isBorderAllowed: false,
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
@ -73,7 +81,9 @@ class FamilyFileAddWidget extends StatelessWidget {
|
|
|
|
fontFamily: "Poppins",
|
|
|
|
fontFamily: "Poppins",
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h),
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h),
|
|
|
|
leadingIcon: AppAssets.smart_phone,
|
|
|
|
leadingIcon: AppAssets.smart_phone,
|
|
|
|
).paddingOnly(top: 8.h, bottom: 4.h),
|
|
|
|
).paddingOnly(top: 8.h, bottom: 4.h);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -91,8 +101,8 @@ class FamilyFileAddWidget extends StatelessWidget {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)) {
|
|
|
|
)) {
|
|
|
|
// authVm.addFamilyMember(otpTypeEnum: OTPTypeEnum.sms, isExcludedUser: true);
|
|
|
|
// authVm.addFamilyMember(otpTypeEnum: OTPTypeEnum.sms, isExcludedUser: true);
|
|
|
|
if (onVerificationPress != null) {
|
|
|
|
if (widget.onVerificationPress != null) {
|
|
|
|
onVerificationPress!();
|
|
|
|
widget.onVerificationPress!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|