WD: Translation of words added and download button added

merge-update-with-lab-changes
taha.alam 1 year 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": "اقرأ أكثر"}, "readMore": {"en": "Read More", "ar": "اقرأ أكثر"},
"showLess": {"en": "Show Less", "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 showLess => localizedValues["showLess"][locale.languageCode];
String get change => localizedValues["change"][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> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

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

@ -86,6 +86,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
projectViewModel.user.emailAddress!, projectViewModel.user.emailAddress!,
), ),
onTap: widget.onTap!, 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, key: cl,
flex: 3, flex: 3,
color: Color(0xFFDE7676), color: Color(0xFFDE7676),
title: "Critical Low", title: TranslationBase.of(context).criticalLow,
),
SizedBox(
width: 4,
), ),
_buildResultBar( _buildResultBar(
key: l, key: l,
flex: 2, flex: 2,
color: Color(0xFFEAB157), color: Color(0xFFEAB157),
title: "Low", title: TranslationBase.of(context).low,
),
SizedBox(
width: 4,
), ),
_buildResultBar( _buildResultBar(
key: n, key: n,
flex: 5, flex: 5,
color: Color(0xFF09AA28), color: Color(0xFF09AA28),
title: "Normal", title: TranslationBase.of(context).normal,
),
SizedBox(
width: 4,
), ),
_buildResultBar( _buildResultBar(
key: h, key: h,
flex: 2, flex: 2,
color: Color(0xFFEAB157), color: Color(0xFFEAB157),
title: "High", title: TranslationBase.of(context).high,
),
SizedBox(
width: 4,
), ),
_buildResultBar( _buildResultBar(
key: ch, key: ch,
flex: 3, flex: 3,
color: Color(0xFFDE7676), color: Color(0xFFDE7676),
title: "Critical High", title: TranslationBase.of(context).criticalHigh,
), ),
], ],
), ),
@ -219,7 +231,8 @@ class TextCloud extends StatelessWidget {
child: Center( child: Center(
child: Text( child: Text(
text, text,
style: TextStyle(color: Colors.white), style: TextStyle(
color: Colors.white, fontSize: 10, letterSpacing: -.24),
)), )),
), ),
Builder(builder: (context) { Builder(builder: (context) {
@ -354,15 +367,15 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Expanded(
title, child: Text(
style: TextStyle( title,
fontSize: 16, style: TextStyle(
fontFamily: fontFamily, fontSize: 16,
fontWeight: FontWeight.w600, fontFamily: fontFamily,
color: const Color(0xff2E303A), fontWeight: FontWeight.w600,
letterSpacing: -0.64, color: const Color(0xff2E303A),
height: 16 / 25, letterSpacing: -.64),
), ),
), ),
GestureDetector( 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), style: TextStyle(fontSize: 14, fontFamily: fontFamily, fontWeight: FontWeight.w600, color: const Color(0xff2E303A), letterSpacing: -0.56),
), ),
Text( Text(
"Reference Range \n $referenceRange", "${TranslationBase.of(context).referenceRange} \n $referenceRange",
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
fontFamily: fontFamily, fontFamily: fontFamily,
@ -417,7 +430,7 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
const Divider(color: Color(0xFFEFEFEF), thickness: 1), const Divider(color: Color(0xFFEFEFEF), thickness: 1),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
"Notes:", "${TranslationBase.of(context).notes}:",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: const Color(0xFF2E303A), 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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -23,6 +22,7 @@ class DoctorHeader extends StatelessWidget {
final bool showConfirmMessageDialog; final bool showConfirmMessageDialog;
final String? buttonTitle; final String? buttonTitle;
final String? buttonIcon; final String? buttonIcon;
final Color? buttonColor;
final bool isNeedToShowButton; final bool isNeedToShowButton;
final bool isShowName; final bool isShowName;
@ -34,6 +34,7 @@ class DoctorHeader extends StatelessWidget {
this.isNeedToShowButton = true, this.isNeedToShowButton = true,
this.isShowName = false, this.isShowName = false,
this.buttonIcon, this.buttonIcon,
this.buttonColor,
this.showConfirmMessageDialog = true, this.showConfirmMessageDialog = true,
this.onRatingAndReviewTap}) this.onRatingAndReviewTap})
: super(key: key); : super(key: key);
@ -173,19 +174,25 @@ class DoctorHeader extends StatelessWidget {
if (showConfirmMessageDialog) if (showConfirmMessageDialog)
showConfirmMessage(context, onTap!, headerModel.email); showConfirmMessage(context, onTap!, headerModel.email);
else else
onTap!(); onTap?.call();
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15), padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15),
decoration: BoxDecoration( 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( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0), SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 4), SizedBox(width: 4),
Text( 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), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),
), ),
], ],

Loading…
Cancel
Save