|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
import "dart:collection";
|
|
|
|
|
|
|
|
|
|
import 'package:auto_size_text/auto_size_text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
|
@ -73,7 +75,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void checkPVM(){
|
|
|
|
|
void checkPVM() {
|
|
|
|
|
if (context.read<ProjectViewModel>().isLogin) {
|
|
|
|
|
if (radioValue == null) {
|
|
|
|
|
if (context.read<ProjectViewModel>().user.gender == 1) {
|
|
|
|
|
@ -89,7 +91,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
ageController.text = context.read<ProjectViewModel>().isLogin ? context.read<ProjectViewModel>().user!.age.toString() : "";
|
|
|
|
|
ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -209,7 +210,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
|
|
|
|
|
AutoSizeText(
|
|
|
|
|
TranslationBase.of(context).nearestAppo.trim(),
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
minFontSize: 10,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 1.4,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.39,
|
|
|
|
|
height: 0.8,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -327,7 +339,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
items: projectsList.map((HospitalsModel item) {
|
|
|
|
|
return DropdownMenuItem<HospitalsModel>(
|
|
|
|
|
value: item,
|
|
|
|
|
child: Text('${item.name!}'),
|
|
|
|
|
child: AutoSizeText(
|
|
|
|
|
item.name!,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
minFontSize: 10,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 1.6,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.39,
|
|
|
|
|
height: 0.8,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Text('${item.name!}'),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
onChanged: (HospitalsModel? newValue) async {
|
|
|
|
|
@ -650,7 +673,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
AppToast.showErrorToast(message: err, localContext: context);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|