|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
@ -17,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dar
|
|
|
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../custom_validation_error.dart';
|
|
|
|
@ -41,21 +41,21 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).addAllergies,
|
|
|
|
|
borderColor: HexColor('#707070'),
|
|
|
|
|
borderWidth: 0.30,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
onTapTextFields: () {
|
|
|
|
|
openAllergiesList(context);
|
|
|
|
|
},
|
|
|
|
|
readOnly: true,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
|
suffixIcon: EvaIcons.plusCircleOutline,
|
|
|
|
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
|
|
|
|
suffixIconColor: Color(0xFF2B353E),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
// controller: messageController,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage;
|
|
|
|
|
return TranslationBase.of(context).emptyMessage;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
}),
|
|
|
|
@ -80,36 +80,59 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? selectedAllergy.selectedAllergy.nameAr
|
|
|
|
|
: selectedAllergy.selectedAllergy.nameEn
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? selectedAllergy.selectedAllergy.nameAr
|
|
|
|
|
: selectedAllergy.selectedAllergy.nameEn
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
textDecoration: selectedAllergy.isChecked
|
|
|
|
|
? null
|
|
|
|
|
: TextDecoration.lineThrough,
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.5,
|
|
|
|
|
// variant: "bodyText",
|
|
|
|
|
textDecoration: selectedAllergy.isChecked
|
|
|
|
|
? null
|
|
|
|
|
: TextDecoration.lineThrough,
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Color(0xFF2B353E)),
|
|
|
|
|
Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? selectedAllergy.selectedAllergySeverity
|
|
|
|
|
.nameAr
|
|
|
|
|
: selectedAllergy.selectedAllergySeverity
|
|
|
|
|
.nameEn
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
// variant: "bodyText",
|
|
|
|
|
textDecoration: selectedAllergy.isChecked
|
|
|
|
|
? null
|
|
|
|
|
: TextDecoration.lineThrough,
|
|
|
|
|
// bold: true,
|
|
|
|
|
color: Color(0xFFCC9B14)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width * 0.5,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? selectedAllergy.selectedAllergySeverity.nameAr
|
|
|
|
|
: selectedAllergy.selectedAllergySeverity.nameEn
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
textDecoration: selectedAllergy.isChecked
|
|
|
|
|
? null
|
|
|
|
|
: TextDecoration.lineThrough,
|
|
|
|
|
bold: true,
|
|
|
|
|
color: AppGlobal.appPrimaryColor),
|
|
|
|
|
|
|
|
|
|
if (selectedAllergy.isChecked)
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
FontAwesomeIcons.trash,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
size: 20,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.remove,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
color: HexColor("#B8382C"),),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.times,
|
|
|
|
|
color: HexColor("#B8382C"),
|
|
|
|
|
size: 20,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
onTap: () => removeAllergy(selectedAllergy),
|
|
|
|
|
)
|
|
|
|
@ -119,14 +142,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
selectedAllergy.remark != null &&
|
|
|
|
|
selectedAllergy.remark != ''
|
|
|
|
|
? TranslationBase.of(context).remarks + " : "
|
|
|
|
|
: '',
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
child: AppText(
|
|
|
|
|