small fix on history

merge-requests/444/head
Elham Rababah 4 years ago
parent 654955fc76
commit d2bd3b68e1

@ -824,8 +824,12 @@ const Map<String, Map<String, String>> localizedValues = {
"accepted": {"en": "Accepted", "ar": "وافقت"},
"cancelled": {"en": "Cancelled", "ar": "ألغيت"},
"unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"},
"replied": {"en": "Replied", "ar": " تم الرد"},"typeHereToReply": {
"replied": {"en": "Replied", "ar": " تم الرد"},
"typeHereToReply": {
"en": "Type here to reply",
"ar": "اكتب هنا للرد"
},"remove": {
"en": "Remove",
"ar": "حذف"
},
};

@ -1205,6 +1205,8 @@ class TranslationBase {
String get unReplied => localizedValues['unReplied'][locale.languageCode];
String get replied => localizedValues['replied'][locale.languageCode];
String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode];
String get remove => localizedValues['remove'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -37,7 +37,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false,
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
Icon(

@ -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(

@ -1,4 +1,3 @@
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';
@ -51,20 +50,21 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).addHistory,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () {
openHistoryList(context);
},
readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor,
suffixIconColor: Color(0xFF2B353E),
readOnly: true,
fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
@ -87,20 +87,44 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
projectViewModel.isArabic
? myHistory.selectedHistory.nameAr
: myHistory.selectedHistory.nameEn,
variant: "bodyText",
fontSize: 15,
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
// bold: true,
color: Colors.black),
width: MediaQuery.of(context).size.width * 0.7,
width: MediaQuery
.of(context)
.size
.width * 0.5,
),
if (myHistory.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",
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
),
Icon(
FontAwesomeIcons.times,
color: HexColor("#B8382C"),
size: 17,
),
],
),
onTap: () => removeHistory(myHistory.selectedHistory),
)

Loading…
Cancel
Save