WD: Translation of words added and download button added

merge-update-with-lab-changes
taha.alam 12 months ago
parent 3d27fbdea8
commit 4c4ae6caef

@ -0,0 +1,4 @@
<svg height="1792" id="download" width="1792" xmlns="http://www.w3.org/2000/svg">
<path
d="M1344 1344q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28H160q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h465l135 136q58 56 136 56t136-56l136-136h464q40 0 68 28t28 68zm-325-569q17 41-14 70l-448 448q-18 19-45 19t-45-19L403 621q-31-29-14-70 17-39 59-39h256V64q0-26 19-45t45-19h256q26 0 45 19t19 45v448h256q42 0 59 39z"></path>
</svg>

After

Width:  |  Height:  |  Size: 531 B

@ -0,0 +1,5 @@
<svg id="Download" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path
class="color000000 svgShape"
d="M1344 1344q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28H160q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h465l135 136q58 56 136 56t136-56l136-136h464q40 0 68 28t28 68zm-325-569q17 41-14 70l-448 448q-18 19-45 19t-45-19L403 621q-31-29-14-70 17-39 59-39h256V64q0-26 19-45t45-19h256q26 0 45 19t19 45v448h256q42 0 59 39z" fill="#ffffff"></path>
</svg>

After

Width:  |  Height:  |  Size: 580 B

@ -2116,5 +2116,12 @@ const Map localizedValues = {
},
"readMore": {"en": "Read More", "ar": "اقرأ أكثر"},
"showLess": {"en": "Show Less", "ar": "عرض أقل"},
"change": {"en": "Change", "ar": "فرق"}
"change": {"en": "Change", "ar": "فرق"},
"download": {"en": "Download", "ar": "تحميل"},
"referenceRange": {"en": "Reference Range", "ar": "النطاق المرجعي"},
"criticalLow": {"en": "Critical Low", "ar": "النطاق المرجعي"},
"criticalHigh": {"en": "Critical High", "ar": "حرج مرتفع"},
"high": {"en": "High", "ar": "مرتفع"},
"normal": {"en": "Normal", "ar": "عادي"},
"low": {"en": "Low", "ar": "منخفض"},
};

@ -3024,6 +3024,22 @@ class TranslationBase {
String get showLess => localizedValues["showLess"][locale.languageCode];
String get change => localizedValues["change"][locale.languageCode];
String get download => localizedValues["download"][locale.languageCode];
String get referenceRange =>
localizedValues["referenceRange"][locale.languageCode];
String get criticalHigh =>
localizedValues["criticalHigh"][locale.languageCode];
String get criticalLow => localizedValues["criticalLow"][locale.languageCode];
String get high => localizedValues["high"][locale.languageCode];
String get normal => localizedValues["normal"][locale.languageCode];
String get low => localizedValues["low"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -71,8 +71,9 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
color: (changeValue.contains("-"))
? Colors.white
: Colors.black,
fontSize: 12,
fontWeight: FontWeight.w500),
fontSize: 11,
letterSpacing: -.64,
fontWeight: FontWeight.w400),
),
),
),

@ -86,6 +86,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
projectViewModel.user.emailAddress!,
),
onTap: widget.onTap!,
buttonColor: Color(0xFF09AA28),
buttonTitle: TranslationBase.of(context).download,
buttonIcon: "assets/images/svg/download_1.svg",
);
}

@ -80,31 +80,43 @@ class CustomResultProgressBar extends StatelessWidget {
key: cl,
flex: 3,
color: Color(0xFFDE7676),
title: "Critical Low",
title: TranslationBase.of(context).criticalLow,
),
SizedBox(
width: 4,
),
_buildResultBar(
key: l,
flex: 2,
color: Color(0xFFEAB157),
title: "Low",
title: TranslationBase.of(context).low,
),
SizedBox(
width: 4,
),
_buildResultBar(
key: n,
flex: 5,
color: Color(0xFF09AA28),
title: "Normal",
title: TranslationBase.of(context).normal,
),
SizedBox(
width: 4,
),
_buildResultBar(
key: h,
flex: 2,
color: Color(0xFFEAB157),
title: "High",
title: TranslationBase.of(context).high,
),
SizedBox(
width: 4,
),
_buildResultBar(
key: ch,
flex: 3,
color: Color(0xFFDE7676),
title: "Critical High",
title: TranslationBase.of(context).criticalHigh,
),
],
),
@ -219,7 +231,8 @@ class TextCloud extends StatelessWidget {
child: Center(
child: Text(
text,
style: TextStyle(color: Colors.white),
style: TextStyle(
color: Colors.white, fontSize: 10, letterSpacing: -.24),
)),
),
Builder(builder: (context) {
@ -354,15 +367,15 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: TextStyle(
fontSize: 16,
fontFamily: fontFamily,
fontWeight: FontWeight.w600,
color: const Color(0xff2E303A),
letterSpacing: -0.64,
height: 16 / 25,
Expanded(
child: Text(
title,
style: TextStyle(
fontSize: 16,
fontFamily: fontFamily,
fontWeight: FontWeight.w600,
color: const Color(0xff2E303A),
letterSpacing: -.64),
),
),
GestureDetector(
@ -385,7 +398,7 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
style: TextStyle(fontSize: 14, fontFamily: fontFamily, fontWeight: FontWeight.w600, color: const Color(0xff2E303A), letterSpacing: -0.56),
),
Text(
"Reference Range \n $referenceRange",
"${TranslationBase.of(context).referenceRange} \n $referenceRange",
style: TextStyle(
fontSize: 10,
fontFamily: fontFamily,
@ -417,7 +430,7 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
const Divider(color: Color(0xFFEFEFEF), thickness: 1),
const SizedBox(height: 10),
Text(
"Notes:",
"${TranslationBase.of(context).notes}:",
style: TextStyle(
fontSize: 12,
color: const Color(0xFF2E303A),

@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/material.dart';
@ -23,6 +22,7 @@ class DoctorHeader extends StatelessWidget {
final bool showConfirmMessageDialog;
final String? buttonTitle;
final String? buttonIcon;
final Color? buttonColor;
final bool isNeedToShowButton;
final bool isShowName;
@ -34,6 +34,7 @@ class DoctorHeader extends StatelessWidget {
this.isNeedToShowButton = true,
this.isShowName = false,
this.buttonIcon,
this.buttonColor,
this.showConfirmMessageDialog = true,
this.onRatingAndReviewTap})
: super(key: key);
@ -173,19 +174,25 @@ class DoctorHeader extends StatelessWidget {
if (showConfirmMessageDialog)
showConfirmMessage(context, onTap!, headerModel.email);
else
onTap!();
onTap?.call();
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15),
decoration: BoxDecoration(
color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
color: buttonColor ?? Color(0XFFD02127),
borderRadius: projectViewModel.isArabic
? BorderRadius.only(
topRight: Radius.circular(10))
: BorderRadius.only(
topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 4),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!,
buttonTitle ??
TranslationBase.of(context).sendEmail,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),
),
],

Loading…
Cancel
Save