|
|
|
|
@ -17,6 +17,9 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart' show CustomButton;
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/date_range_selector/date_range_calender.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/date_range_selector/models/calendar_design_type.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:provider/provider.dart';
|
|
|
|
|
@ -153,12 +156,37 @@ class _RegisterNew extends State<RegisterNew> {
|
|
|
|
|
},
|
|
|
|
|
).withVerticalPadding(8),
|
|
|
|
|
Divider(height: 1),
|
|
|
|
|
TextInputWidget(
|
|
|
|
|
GestureDetector(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
title: LocaleKeys.selectDate.tr(context: context),
|
|
|
|
|
context,
|
|
|
|
|
child: DateRangeSelector(
|
|
|
|
|
onRangeSelected: (DateTime? start, DateTime? end) {
|
|
|
|
|
if (start != null) {
|
|
|
|
|
var picked = start.toString().split(" ").first;
|
|
|
|
|
// authVm.dobController.text = picked;
|
|
|
|
|
authVm.onDobChange(picked);
|
|
|
|
|
// Clear error when user selects a date
|
|
|
|
|
authVm.clearDobError();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
designType: CalendarDesignType.designV2,
|
|
|
|
|
showCalendarToggle: true,
|
|
|
|
|
onCalendarTypeChanged: null,
|
|
|
|
|
btnTitle: LocaleKeys.done.tr(context: context),
|
|
|
|
|
),
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: TextInputWidget(
|
|
|
|
|
labelText: LocaleKeys.dob.tr(context: context),
|
|
|
|
|
hintText: "11 July, 1994",
|
|
|
|
|
controller: authVm.dobController,
|
|
|
|
|
focusNode: _dobFocusNode,
|
|
|
|
|
isEnable: true,
|
|
|
|
|
isEnable: false,
|
|
|
|
|
prefix: null,
|
|
|
|
|
isAllowRadius: true,
|
|
|
|
|
isBorderAllowed: false,
|
|
|
|
|
@ -177,6 +205,7 @@ class _RegisterNew extends State<RegisterNew> {
|
|
|
|
|
// Don't show individual field border
|
|
|
|
|
errorMessage: authVm.dobError, // Show error message if exists
|
|
|
|
|
).withVerticalPadding(8),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|