code update in progress

merge-update-with-lab-changes
Sultan khan 2 years ago
parent 971bab465c
commit 391331f508

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart';
import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; import 'package:diplomaticquarterapp/generated/json/base/json_field.dart';
class PackagesCategoriesResponseModel with JsonConvert<PackagesCategoriesResponseModel> { class PackagesCategoriesResponseModel extends JsonConvert<PackagesCategoriesResponseModel> {
int? id; int? id;
String? name; String? name;
String? namen; String? namen;
@ -63,14 +63,14 @@ class PackagesCategoriesResponseModel with JsonConvert<PackagesCategoriesRespons
} }
} }
class OfferCategoriesResponseModelLocalizedName with JsonConvert<OfferCategoriesResponseModelLocalizedName> { class OfferCategoriesResponseModelLocalizedName extends JsonConvert<OfferCategoriesResponseModelLocalizedName> {
@JSONField(name: "language_id") @JSONField(name: "language_id")
int? languageId; int? languageId;
@JSONField(name: "localized_name") @JSONField(name: "localized_name")
String? localizedName; String? localizedName;
} }
class OfferCategoriesResponseModelImage with JsonConvert<OfferCategoriesResponseModelImage> { class OfferCategoriesResponseModelImage extends JsonConvert<OfferCategoriesResponseModelImage> {
String? src; String? src;
dynamic thumb; dynamic thumb;
dynamic attachment; dynamic attachment;

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart';
import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; import 'package:diplomaticquarterapp/generated/json/base/json_field.dart';
class PackagesResponseModel with JsonConvert<PackagesResponseModel> { class PackagesResponseModel extends JsonConvert<PackagesResponseModel> {
int? id; int? id;
@JSONField(name: "visible_individually") @JSONField(name: "visible_individually")
bool? visibleIndividually; bool? visibleIndividually;
@ -219,14 +219,14 @@ class PackagesResponseModel with JsonConvert<PackagesResponseModel> {
} }
} }
class OfferProductsResponseModelLocalizedName with JsonConvert<OfferProductsResponseModelLocalizedName> { class OfferProductsResponseModelLocalizedName extends JsonConvert<OfferProductsResponseModelLocalizedName> {
@JSONField(name: "language_id") @JSONField(name: "language_id")
int? languageId; int? languageId;
@JSONField(name: "localized_name") @JSONField(name: "localized_name")
String? localizedName; String? localizedName;
} }
class OfferProductsResponseModelImage with JsonConvert<OfferProductsResponseModelImage> { class OfferProductsResponseModelImage extends JsonConvert<OfferProductsResponseModelImage> {
int? id; int? id;
int? position; int? position;
String? src; String? src;
@ -234,7 +234,7 @@ class OfferProductsResponseModelImage with JsonConvert<OfferProductsResponseMode
String? attachment; String? attachment;
} }
class OfferProductsResponseModelSpecification with JsonConvert<OfferProductsResponseModelSpecification> { class OfferProductsResponseModelSpecification extends JsonConvert<OfferProductsResponseModelSpecification> {
int? id; int? id;
@JSONField(name: "display_order") @JSONField(name: "display_order")
int? displayOrder; int? displayOrder;

@ -74,7 +74,7 @@ class OffersAndPackagesServices extends BaseService {
return projectsList; return projectsList;
} }
Future<List<PackagesResponseModel>> getAllProducts({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true, bool byOffset = true}) async { Future<List<PackagesResponseModel>> getAllProducts({required OffersProductsRequestModel request, BuildContext? context, bool showLoading = true, bool byOffset = true}) async {
Future errorThrow; Future errorThrow;
productList = []; productList = [];
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;

@ -26,22 +26,22 @@ import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
class QRCode extends StatefulWidget { class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse; late PatientShareResponse? patientShareResponse;
AppoitmentAllHistoryResultList appointment; late AppoitmentAllHistoryResultList? appointment;
String appoQR; late String? appoQR;
AuthenticatedUser authUser; AuthenticatedUser? authUser;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
QRCode({@required this.patientShareResponse, @required this.appoQR, @required this.appointment}); QRCode({required this.patientShareResponse, required this.appoQR, required this.appointment});
@override @override
_QRCodeState createState() => _QRCodeState(); _QRCodeState createState() => _QRCodeState();
} }
class _QRCodeState extends State<QRCode> { class _QRCodeState extends State<QRCode> {
Uint8List _bytes; late Uint8List _bytes;
bool _supportsNFC = false; bool _supportsNFC = false;
BuildContext _context; late BuildContext _context;
@override @override
void initState() { void initState() {
@ -66,11 +66,11 @@ class _QRCodeState extends State<QRCode> {
showNfcReader(context, onNcfScan: (String nfcId) { showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId); sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment); locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
}); });
}, onCancel: () { }, onCancel: () {
// Navigator.of(context).pop(); // Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment); locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment!);
}); });
}); });
} }
@ -89,20 +89,20 @@ class _QRCodeState extends State<QRCode> {
children: [ children: [
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.appointment.doctorTitle + " " + widget.appointment.doctorNameObj, widget.appointment!.doctorTitle + " " + widget.appointment!.doctorNameObj,
widget.appointment.doctorID, widget.appointment!.doctorID,
widget.appointment.doctorImageURL, widget.appointment!.doctorImageURL,
widget.appointment.doctorSpeciality, widget.appointment!.doctorSpeciality,
"", "",
widget.appointment.projectName, widget.appointment!.projectName,
DateUtil.convertStringToDate(widget.appointment.appointmentDate), DateUtil.convertStringToDate(widget.appointment!.appointmentDate),
widget.appointment.isLiveCareAppointment widget.appointment!.isLiveCareAppointment
? DateUtil.convertStringToDate(widget.appointment.appointmentDate).toString().split(" ")[1].substring(0, 5) ? DateUtil.convertStringToDate(widget.appointment!.appointmentDate).toString().split(" ")[1].substring(0, 5)
: widget.appointment.startTime.substring(0, 5), : widget.appointment!.startTime.substring(0, 5),
null, null,
widget.appointment.doctorRate, widget.appointment!.doctorRate,
widget.appointment.actualDoctorRate, widget.appointment!.actualDoctorRate,
widget.appointment.noOfPatientsRate, widget.appointment!.noOfPatientsRate,
"", "",
), ),
isShowName: true, isShowName: true,

@ -5,15 +5,15 @@ class GestureIconButton extends StatefulWidget {
GestureIconButton( GestureIconButton(
this.label, this.label,
this.icon, { this.icon, {
Key key, Key? key,
this.onTap, this.onTap,
this.backgroundColor, this.backgroundColor,
}) : super(key: key); }) : super(key: key);
final String label; final String label;
final Widget icon; final Widget icon;
final VoidCallback onTap; final VoidCallback? onTap;
final Color backgroundColor; final Color? backgroundColor;
@override @override
_GestureIconButtonState createState() => _GestureIconButtonState(); _GestureIconButtonState createState() => _GestureIconButtonState();

@ -12,15 +12,15 @@ enum MINI_BUTTON { Secondary, Primary }
class MiniButton extends StatefulWidget { class MiniButton extends StatefulWidget {
MiniButton( MiniButton(
{ {
this.label: "", this.label= "",
this.icon, this.icon,
this.onTap, this.onTap,
this.variant: MINI_BUTTON.Secondary}); this.variant= MINI_BUTTON.Secondary});
final String label; final String? label;
final IconData icon; final IconData? icon;
final VoidCallback onTap; final VoidCallback? onTap;
final MINI_BUTTON variant; final MINI_BUTTON variant;
@override @override
@ -29,8 +29,8 @@ class MiniButton extends StatefulWidget {
class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin { class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin {
double _buttonSize = 1.0; double _buttonSize = 1.0;
AnimationController _animationController; late AnimationController _animationController;
Animation _animation; late Animation _animation;
PermissionService permission = new PermissionService(); PermissionService permission = new PermissionService();
@override @override
void initState() { void initState() {
@ -87,7 +87,7 @@ class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin {
_animationController.forward(); _animationController.forward();
}, },
// onTap: Feedback.wrapForTap(widget.onTap, context), // onTap: Feedback.wrapForTap(widget.onTap, context),
onTap: () =>{ widget.onTap(), }, onTap: () =>{ widget.onTap!(), },
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -16,14 +16,14 @@ import 'package:provider/provider.dart';
/// [noBorderRadius] remove border radius /// [noBorderRadius] remove border radius
class SecondaryButton extends StatefulWidget { class SecondaryButton extends StatefulWidget {
SecondaryButton( SecondaryButton(
{Key key, {Key? key,
this.label = "", this.label = "",
this.icon, this.icon,
this.iconOnly = false, this.iconOnly = false,
this.color, this.color,
this.textColor = Colors.white, this.textColor = Colors.white,
this.onTap, this.onTap,
this.loading: false, this.loading= false,
this.small = false, this.small = false,
this.disabled = false, this.disabled = false,
this.borderColor, this.borderColor,
@ -34,20 +34,20 @@ class SecondaryButton extends StatefulWidget {
: super(key: key); : super(key: key);
final String label; final String label;
final Widget icon; final Widget? icon;
final VoidCallback onTap; final VoidCallback? onTap;
final bool loading; final bool? loading;
final Color color; final Color? color;
final Color textColor; final Color? textColor;
final Color borderColor; final Color? borderColor;
final bool small; final bool small;
final bool iconOnly; final bool iconOnly;
final bool disabled; final bool disabled;
final bool noBorderRadius; final bool noBorderRadius;
final double borderRadius; final double? borderRadius;
final Color disableColor; final Color? disableColor;
final FontWeight fontWeight; final FontWeight? fontWeight;
final double fontSize; final double? fontSize;
@override @override
@ -57,12 +57,12 @@ class SecondaryButton extends StatefulWidget {
class _SecondaryButtonState extends State<SecondaryButton> class _SecondaryButtonState extends State<SecondaryButton>
with TickerProviderStateMixin { with TickerProviderStateMixin {
double _buttonSize = 1.0; double _buttonSize = 1.0;
AnimationController _animationController; late AnimationController _animationController;
Animation _animation; late Animation _animation;
PermissionService permission = new PermissionService(); PermissionService permission = new PermissionService();
double _rippleSize = 0.0; double _rippleSize = 0.0;
AnimationController _rippleController; late AnimationController _rippleController;
Animation _rippleAnimation; late Animation _rippleAnimation;
@override @override
void initState() { void initState() {
@ -139,7 +139,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return IgnorePointer( return IgnorePointer(
ignoring: widget.loading, ignoring: widget.loading!,
child: GestureDetector( child: GestureDetector(
onTapDown: (TapDownDetails tap) { onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0); _animationController.reverse(from: 1.0);
@ -151,7 +151,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
_animationController.forward(); _animationController.forward();
}, },
onTap: () => { onTap: () => {
widget.disabled ? null : widget.onTap(), widget.disabled ? null : widget.onTap!(),
}, },
// onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context), // onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
@ -161,7 +161,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
decoration: BoxDecoration( decoration: BoxDecoration(
border: widget.borderColor != null border: widget.borderColor != null
? Border.all( ? Border.all(
color: widget.borderColor.withOpacity(0.1), width: 2.0) color: widget.borderColor!.withOpacity(0.1), width: 2.0)
: null, : null,
borderRadius: BorderRadius.all(Radius.circular(100.0)), borderRadius: BorderRadius.all(Radius.circular(100.0)),
boxShadow: [ boxShadow: [
@ -188,7 +188,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
decoration: BoxDecoration( decoration: BoxDecoration(
color: widget.disabled color: widget.disabled
? widget.disableColor ?? Colors.grey ? widget.disableColor ?? Colors.grey
: widget.color ?? Theme.of(context).buttonColor), : widget.color ?? Theme.of(context).buttonTheme.colorScheme!.background),
), ),
), ),
Positioned( Positioned(
@ -203,7 +203,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
// shape: BoxShape.circle, // shape: BoxShape.circle,
color: widget.disabled color: widget.disabled
? widget.disableColor ?? Colors.grey ? widget.disableColor ?? Colors.grey
: widget.color ?? Theme.of(context).buttonColor, : widget.color ?? Theme.of(context).buttonTheme.colorScheme!.background,
), ),
), ),
), ),
@ -226,7 +226,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
widget.loading widget.loading!
? Padding( ? Padding(
padding: EdgeInsets.all(2.6), padding: EdgeInsets.all(2.6),
child: SizedBox( child: SizedBox(
@ -236,7 +236,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
backgroundColor: Colors.white, backgroundColor: Colors.white,
valueColor: valueColor:
AlwaysStoppedAnimation<Color>( AlwaysStoppedAnimation<Color>(
Colors.grey[300], Colors.grey[300]!,
), ),
), ),
), ),

@ -6,8 +6,8 @@ import 'package:flutter/material.dart';
// DESCRIPTION : Custom widget for rounded container and custom decoration // DESCRIPTION : Custom widget for rounded container and custom decoration
class RoundedContainer extends StatefulWidget { class RoundedContainer extends StatefulWidget {
final double width; final double? width;
final double height; final double? height;
final double raduis; final double raduis;
final Color backgroundColor; final Color backgroundColor;
final double margin; final double margin;
@ -19,11 +19,11 @@ class RoundedContainer extends StatefulWidget {
final double bottomRight; final double bottomRight;
final double topRight; final double topRight;
final double bottomLeft; final double bottomLeft;
final Widget child; final Widget? child;
final double borderWidth; final double borderWidth;
RoundedContainer( RoundedContainer(
{@required this.child, {required this.child,
this.width, this.width,
this.height, this.height,
this.raduis = 10, this.raduis = 10,

@ -105,11 +105,11 @@ class _CarouselIndicatorState extends State<CarouselIndicator>
_animationController.reset(); _animationController.reset();
/// for each new index we want to change value so setting [_tween] to (oldWidget.index,widget.index) so animation tween from old position to new position rather not start from 0.0 again and again. /// for each new index we want to change value so setting [_tween] to (oldWidget.index,widget.index) so animation tween from old position to new position rather not start from 0.0 again and again.
createAnimation(oldWidget.index.toDouble(), widget.index.toDouble()); createAnimation(oldWidget.index!.toDouble(), widget.index!.toDouble());
_animationController.forward(); _animationController.forward();
} else { } else {
_animationController.reset(); _animationController.reset();
createAnimation(oldWidget.index.toDouble(), 0.0); createAnimation(oldWidget.index!.toDouble(), 0.0);
_animationController.forward(); _animationController.forward();
} }
} }
@ -155,7 +155,7 @@ abstract class BasePainter extends CustomPainter {
double height = widget.height; double height = widget.height;
double distance = width + space; double distance = width + space;
double radius = width / 2; double radius = width / 2;
for (int i = 0, c = widget.count; i < c; ++i) { for (int i = 0, c = widget.count!; i < c; ++i) {
canvas.drawRRect( canvas.drawRRect(
RRect.fromRectAndRadius( RRect.fromRectAndRadius(
Rect.fromCenter( Rect.fromCenter(

@ -109,7 +109,7 @@ class LabResultWidget extends StatelessWidget {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value); print(value);
if (value != null && value == true) { if (value != null && value == true) {
showConfirmMessage(context, projectViewModel.user.emailAddress, "yes"); showConfirmMessage(context, projectViewModel.user!.emailAddress!, "yes");
} }
}); });
} }
@ -125,7 +125,7 @@ class LabResultWidget extends StatelessWidget {
openPassportUpdatePage(context) openPassportUpdatePage(context)
// showConfirmMessage(context, projectViewModel.user.emailAddress, "yes") // showConfirmMessage(context, projectViewModel.user.emailAddress, "yes")
}, },
cancelFunction: () => {showConfirmMessage(context, projectViewModel.user.emailAddress, "no")}); cancelFunction: () => {showConfirmMessage(context, projectViewModel.user!.emailAddress!, "no")});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
@ -144,7 +144,7 @@ class LabResultWidget extends StatelessWidget {
bool checkIfCovidLab(List<LabResult> labResultList) { bool checkIfCovidLab(List<LabResult> labResultList) {
bool isCovidResult = false; bool isCovidResult = false;
labResultList.forEach((order) { labResultList.forEach((order) {
if ((order.testCode.toUpperCase().contains("COVID") || order.testCode.toUpperCase().contains("COV")) && order.isCertificateAllowed.toString().toLowerCase() == "true") { if ((order.testCode!.toUpperCase().contains("COVID") || order.testCode!.toUpperCase().contains("COV")) && order.isCertificateAllowed.toString().toLowerCase() == "true") {
isCovidResult = true; isCovidResult = true;
covidLabResult = order; covidLabResult = order;
} }
@ -185,8 +185,8 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 12, right: projectViewModel.isArabic ? 12 : 0), padding: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 12, right: projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValue(labResultList[i].description ?? "", isLast: true, mProjectViewModel: projectViewModel), child: Utils.tableColumnValue(labResultList[i].description ?? "", isLast: true, mProjectViewModel: projectViewModel),
), ),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true, mProjectViewModel: projectViewModel), Utils.tableColumnValue(labResultList[i].resultValue! + " " + labResultList![i].uOM!, isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), Utils.tableColumnValue(labResultList[i]!.referanceRange!, isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
!checkIfCovidLab(patientLabResultList!) !checkIfCovidLab(patientLabResultList!)
? InkWell( ? InkWell(
onTap: () { onTap: () {

@ -46,8 +46,8 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)), Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList![i].verifiedOnDateTime!)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)), Utils.tableColumnValue(labOrderResultList[i].resultValue!, isLast: i == (labOrderResultList.length - 1)),
], ],
), ),
); );

@ -88,7 +88,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
rotateAngle: -0, rotateAngle: -0,
getTitles: (value) { getTitles: (value) {
print(value); print(value);
DateTime date = DateUtil.convertStringToDate(widget.labResult![value.toInt()].verifiedOnDateTime); DateTime date = DateUtil.convertStringToDate(widget.labResult![value.toInt()]!.verifiedOnDateTime!);
if (widget.labResult!.length < 8) { if (widget.labResult!.length < 8) {
if (widget.labResult!.length > value.toInt()) { if (widget.labResult!.length > value.toInt()) {
return '${date.day}/ ${date.year}'; return '${date.day}/ ${date.year}';
@ -155,7 +155,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
double max = 0; double max = 0;
widget.labResult!.forEach((element) { widget.labResult!.forEach((element) {
try { try {
double resultValueDouble = double.parse(element.resultValue); double resultValueDouble = double.parse(element.resultValue!);
if (resultValueDouble > max) max = resultValueDouble; if (resultValueDouble > max) max = resultValueDouble;
} catch (e) { } catch (e) {
print(e); print(e);
@ -168,10 +168,10 @@ class LineChartCurvedState extends State<LineChartCurved> {
double getMinY() { double getMinY() {
double min = 0; double min = 0;
try { try {
min = double.parse(widget.labResult![0].resultValue); min = double.parse(widget.labResult![0].resultValue!);
widget.labResult!.forEach((element) { widget.labResult!.forEach((element) {
double resultValueDouble = double.parse(element.resultValue); double resultValueDouble = double.parse(element.resultValue!);
if (resultValueDouble < min) min = resultValueDouble; if (resultValueDouble < min) min = resultValueDouble;
}); });
} catch (e) { } catch (e) {
@ -186,7 +186,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
List<FlSpot> spots =[]; List<FlSpot> spots =[];
for (int index = 0; index < widget.labResult!.length; index++) { for (int index = 0; index < widget.labResult!.length; index++) {
try { try {
var resultValueDouble = double.parse(widget.labResult![index].resultValue); var resultValueDouble = double.parse(widget.labResult![index].resultValue!);
print("$index:$resultValueDouble"); print("$index:$resultValueDouble");
spots.add(FlSpot(index.toDouble(), resultValueDouble)); spots.add(FlSpot(index.toDouble(), resultValueDouble));
} catch (e) { } catch (e) {

@ -36,7 +36,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID)), patientLabOrder: widget.patientLabOrder!), onModelReady: (model) => model.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID!)), patientLabOrder: widget.patientLabOrder!),
builder: (_, model, w) => NetworkBaseView( builder: (_, model, w) => NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Column( child: Column(
@ -44,19 +44,19 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[ children: <Widget>[
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.patientLabOrder!.doctorName, widget.patientLabOrder!.doctorName!,
widget.patientLabOrder!.doctorID, widget.patientLabOrder!.doctorID!,
widget.patientLabOrder!.doctorImageURL, widget.patientLabOrder!.doctorImageURL!,
widget.patientLabOrder!.speciality, widget.patientLabOrder!.speciality!,
widget.billNo!, widget.billNo!,
widget.patientLabOrder!.projectName, widget.patientLabOrder!.projectName!,
widget.patientLabOrder!.orderDate, widget.patientLabOrder!.orderDate!,
"", "",
widget.patientLabOrder!.nationalityFlagURL, widget.patientLabOrder!.nationalityFlagURL!,
widget.patientLabOrder!.doctorRate, widget.patientLabOrder!.doctorRate!,
widget.patientLabOrder!.actualDoctorRate, widget.patientLabOrder!.actualDoctorRate!,
widget.patientLabOrder!.noOfPatientsRate, widget.patientLabOrder!.noOfPatientsRate!,
projectViewModel.user.emailAddress), projectViewModel.user!.emailAddress!),
onTap: widget.onTap!, onTap: widget.onTap!,
), ),
SizedBox(height: 10), SizedBox(height: 10),

@ -45,10 +45,10 @@ class _TimeLineViewState extends State<TimeLineView> {
for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) {
tempList.add(widget.appoitmentAllHistoryResultList[i]); tempList.add(widget.appoitmentAllHistoryResultList[i]);
dateObjs.add(new DateObj( dateObjs.add(new DateObj(
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate).month, DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).month,
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate).year, DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).year,
DateUtil.getMonthYearLangDateFormatted( DateUtil.getMonthYearLangDateFormatted(
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate), DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!),
widget.isArabic ? "ar" : "en", widget.isArabic ? "ar" : "en",
))); )));
} }
@ -70,7 +70,7 @@ class _TimeLineViewState extends State<TimeLineView> {
} else { } else {
for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) {
if (DateUtil.getMonthYearLangDateFormatted( if (DateUtil.getMonthYearLangDateFormatted(
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate), DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!),
widget.isArabic ? "ar" : "en", widget.isArabic ? "ar" : "en",
) == ) ==
selectedDateObj.monthYear) { selectedDateObj.monthYear) {
@ -327,7 +327,7 @@ class TimelineNewWidget extends StatelessWidget {
children: [ children: [
Text( Text(
DateUtil.getDayMonthYearLangDateFormatted( DateUtil.getDayMonthYearLangDateFormatted(
DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate), DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate!),
projectViewModel.isArabic ? "ar" : "en", projectViewModel.isArabic ? "ar" : "en",
), ),
style: TextStyle( style: TextStyle(
@ -353,16 +353,16 @@ class TimelineNewWidget extends StatelessWidget {
parentIndex: 2, parentIndex: 2,
))); )));
}, },
name: appoitmentAllHistoryResul!.doctorNameObj, name: appoitmentAllHistoryResul!.doctorNameObj!,
disableProfileView: false, disableProfileView: false,
url: appoitmentAllHistoryResul!.doctorImageURL, url: appoitmentAllHistoryResul!.doctorImageURL!,
width: 30, width: 30,
height: 30, height: 30,
isAppointmentAvatar: true, isAppointmentAvatar: true,
), ),
mHeight(6), mHeight(6),
Text( Text(
appoitmentAllHistoryResul!.doctorNameObj, appoitmentAllHistoryResul!.doctorNameObj!,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 10, fontSize: 10,
@ -371,7 +371,7 @@ class TimelineNewWidget extends StatelessWidget {
), ),
), ),
Text( Text(
appoitmentAllHistoryResul!.clinicName, appoitmentAllHistoryResul!.clinicName!,
style: TextStyle( style: TextStyle(
color: CustomColors.grey2, color: CustomColors.grey2,
fontSize: 10, fontSize: 10,

@ -62,7 +62,7 @@ class TimeLineWidget extends StatelessWidget {
), ),
); );
}, },
name: appoitmentAllHistoryResul!.doctorImageURL, name: appoitmentAllHistoryResul!.doctorImageURL!,
width: 30, width: 30,
height: 30, height: 30,
), ),
@ -87,7 +87,7 @@ class TimeLineWidget extends StatelessWidget {
height: 4, height: 4,
), ),
Texts( Texts(
DateUtil.getMonthDayYearLangDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate), projectViewModel.isArabic ? "ar" : "en"), DateUtil.getMonthDayYearLangDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate!), projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -110,13 +110,13 @@ class TimeLineWidget extends StatelessWidget {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Texts( Texts(
appoitmentAllHistoryResul!.clinicName.trim(), appoitmentAllHistoryResul!.clinicName!.trim(),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Texts( Texts(
DateUtil.getMonthDayYearLangDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate), projectViewModel.isArabic ? "ar" : "en"), DateUtil.getMonthDayYearLangDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul!.appointmentDate!), projectViewModel.isArabic ? "ar" : "en"),
color: Colors.white, color: Colors.white,
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -150,8 +150,8 @@ class TimeLineWidget extends StatelessWidget {
appo: appoitmentAllHistoryResul!, appo: appoitmentAllHistoryResul!,
))); )));
}, },
name: appoitmentAllHistoryResul!.doctorNameObj, name: appoitmentAllHistoryResul!.doctorNameObj!,
url: appoitmentAllHistoryResul!.doctorImageURL, url: appoitmentAllHistoryResul!.doctorImageURL!,
width: 30, width: 30,
height: 30, height: 30,
), ),
@ -159,7 +159,7 @@ class TimeLineWidget extends StatelessWidget {
height: 3, height: 3,
), ),
Texts( Texts(
appoitmentAllHistoryResul!.doctorNameObj.trim(), appoitmentAllHistoryResul!.doctorNameObj!.trim(),
color: Colors.white, color: Colors.white,
fontSize: 10.5, fontSize: 10.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

@ -65,7 +65,7 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
}, },
child: ListTile( child: ListTile(
title: Text( title: Text(
widget.addresses![index].address1, widget.addresses![index].address1!,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.46, letterSpacing: -0.46,

@ -142,7 +142,7 @@ class _AppDrawerState extends State<AppDrawer> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
(user != null && projectProvider!.isLogin) ? user!.firstName + ' ' + user!.lastName : TranslationBase.of(context).cantSeeProfile, (user != null && projectProvider!.isLogin) ? user!.firstName! + ' ' + user!.lastName! : TranslationBase.of(context).cantSeeProfile,
style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20), style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20),
), ),
Text( Text(
@ -248,7 +248,7 @@ class _AppDrawerState extends State<AppDrawer> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
mainUser!.firstName + ' ' + mainUser!.lastName, mainUser!.firstName! + ' ' + mainUser!.lastName!,
color: Color(0xff2E303A), //Theme.of(context).textTheme.bodyText1.color, color: Color(0xff2E303A), //Theme.of(context).textTheme.bodyText1.color,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
@ -276,7 +276,7 @@ class _AppDrawerState extends State<AppDrawer> {
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: snapshot.data!.getAllSharedRecordsByStatusList.map<Widget>((result) { children: snapshot.data!.getAllSharedRecordsByStatusList!.map<Widget>((result) {
return result.status == 3 return result.status == 3
? Container( ? Container(
padding: EdgeInsets.only(bottom: 5), padding: EdgeInsets.only(bottom: 5),
@ -298,7 +298,7 @@ class _AppDrawerState extends State<AppDrawer> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
result.patientName, result.patientName!,
color: result.responseID == user!.patientID ? Color(0xffC5272D) : Color(0xff2B353E), color: result.responseID == user!.patientID ? Color(0xffC5272D) : Color(0xff2B353E),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 11, fontSize: 11,

@ -204,7 +204,7 @@ class MyInAppBrowser extends InAppBrowser {
tamaraRequestModel.orderDescription = orderDesc; tamaraRequestModel.orderDescription = orderDesc;
tamaraRequestModel.isInstallment = true; tamaraRequestModel.isInstallment = true;
tamaraRequestModel.projectID = num.parse(projId); tamaraRequestModel.projectID = num.parse(projId);
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber; tamaraRequestModel.accessCode = authenticatedUser.mobileNumber!;
tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0"; tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0";
tamaraRequestModel.customerName = patientName; tamaraRequestModel.customerName = patientName;
tamaraRequestModel.fileNumber = patientID.toString(); tamaraRequestModel.fileNumber = patientID.toString();
@ -247,7 +247,7 @@ class MyInAppBrowser extends InAppBrowser {
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo!); MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo!);
// getPatientData(); // getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) { generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
if (order.customValuesXml.contains("ApplePay")) { if (order.customValuesXml!.contains("ApplePay")) {
safariBrowser.open(url: Uri.parse(value)); safariBrowser.open(url: Uri.parse(value));
} else { } else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions);
@ -336,9 +336,9 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout"); form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout");
form = form.replaceFirst('INSTALLMENTS_VALUE', installments); form = form.replaceFirst('INSTALLMENTS_VALUE', installments);
form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo); form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!);
form = form.replaceFirst('CUSTMOBILE_VALUE', authUser.mobileNumber); form = form.replaceFirst('CUSTMOBILE_VALUE', authUser.mobileNumber!);
form = form.replaceFirst('CUSTDOB_VALUE', DateUtil.getDayMonthYearDateFormatted(authUser.dateofBirthDataTime)); form = form.replaceFirst('CUSTDOB_VALUE', DateUtil.getDayMonthYearDateFormatted(authUser.dateofBirthDataTime!));
form = form.replaceFirst('CURRENCY_VALUE', authUser.outSA == 0 ? "SAR" : "AED"); form = form.replaceFirst('CURRENCY_VALUE', authUser.outSA == 0 ? "SAR" : "AED");
form = form.replaceFirst('COUNTRY_CODE_VALUE', authUser.outSA == 0 ? "966" : "971"); form = form.replaceFirst('COUNTRY_CODE_VALUE', authUser.outSA == 0 ? "966" : "971");
@ -353,7 +353,7 @@ class MyInAppBrowser extends InAppBrowser {
Future<String> generatePharmacyURL( Future<String> generatePharmacyURL(
OrderDetailModel order, double amount, String orderDesc, String transactionID, String emailId, String paymentMethod, String patientName, dynamic patientID, AuthenticatedUser authUser) async { OrderDetailModel order, double amount, String orderDesc, String transactionID, String emailId, String paymentMethod, String patientName, dynamic patientID, AuthenticatedUser authUser) async {
String pharmacyURL = PRESCRIPTION_PAYMENT_WITH_ORDERID + order.orderGuid + '&&CustomerId=' + "${order.customerId}"; String pharmacyURL = PRESCRIPTION_PAYMENT_WITH_ORDERID + order.orderGuid! + '&&CustomerId=' + "${order.customerId}";
return pharmacyURL; return pharmacyURL;
} }

@ -42,12 +42,12 @@ class PackagesCartItemCardState extends State<PackagesCartItemCard> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
_itemName(widget.itemModel.product.getName()), _itemName(widget.itemModel.product.getName()),
Expanded(child: _itemDescription(widget.itemModel.product.shortDescription)), Expanded(child: _itemDescription(widget.itemModel.product.shortDescription!)),
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_itemPrice(widget.itemModel.product.price, context: context), _itemPrice(widget.itemModel.product.price!, context: context),
InkWell( InkWell(
onTap: () async { onTap: () async {
await widget.viewModel.service.deleteProductFromCart(widget.itemModel.id, context: context, showLoading: false); await widget.viewModel.service.deleteProductFromCart(widget.itemModel.id, context: context, showLoading: false);
@ -87,7 +87,7 @@ class PackagesCartItemCardState extends State<PackagesCartItemCard> {
Widget _image(PackagesResponseModel model) => AspectRatio( Widget _image(PackagesResponseModel model) => AspectRatio(
aspectRatio: 1 / 1, aspectRatio: 1 / 1,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(15), child: (model.images.isNotEmpty) ? Utils.loadNetworkImage(url: model.images.first.src, fitting: BoxFit.fill) : Container(color: Colors.grey[200])), borderRadius: BorderRadius.circular(15), child: (model.images!.isNotEmpty) ? Utils.loadNetworkImage(url: model.images!.first.src!, fitting: BoxFit.fill) : Container(color: Colors.grey[200])),
); );
Widget _itemName(String name) => Text( Widget _itemName(String name) => Text(

@ -24,7 +24,7 @@ class PackagesItemCard extends StatefulWidget {
} }
class PackagesItemCardState extends State<PackagesItemCard> { class PackagesItemCardState extends State<PackagesItemCard> {
imageUrl() => widget.itemModel.images.isNotEmpty ? widget.itemModel.images.first.src : "https://wallpaperaccess.com/full/30103.jpg"; imageUrl() => widget.itemModel.images!.isNotEmpty ? widget.itemModel.images!.first.src : "https://wallpaperaccess.com/full/30103.jpg";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -47,12 +47,12 @@ class PackagesItemCardState extends State<PackagesItemCard> {
aspectRatio: 144 / 144, aspectRatio: 144 / 144,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
child: Image.network(widget.itemModel.images.isNotEmpty ? widget.itemModel.images[0].src : "https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0), child: Image.network(widget.itemModel!.images!.isNotEmpty ? widget.itemModel!.images![0].src! : "https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0),
), ),
), ),
SizedBox(height: 6), SizedBox(height: 6),
Text( Text(
widget.itemModel.name, widget.itemModel.name!,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
@ -61,7 +61,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
color: Color(0xff2B353E), color: Color(0xff2B353E),
), ),
), ),
Text(widget.itemModel.shortDescription, Text(widget.itemModel.shortDescription!,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -70,7 +70,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
color: Color(0xff535353), color: Color(0xff535353),
), ),
overflow: TextOverflow.ellipsis), overflow: TextOverflow.ellipsis),
if (widget.itemModel.hasDiscountsApplied) if (widget.itemModel.hasDiscountsApplied!)
Container( Container(
margin: const EdgeInsets.only(top: 19.0), margin: const EdgeInsets.only(top: 19.0),
child: Text( child: Text(
@ -85,7 +85,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
), ),
), ),
Container( Container(
margin: widget.itemModel.hasDiscountsApplied ? const EdgeInsets.only(top: 0.0) : const EdgeInsets.only(top: 19.0), margin: widget.itemModel.hasDiscountsApplied! ? const EdgeInsets.only(top: 0.0) : const EdgeInsets.only(top: 19.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -146,18 +146,18 @@ class PackagesItemCardState extends State<PackagesItemCard> {
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
child: Image.network("https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0), child: Image.network("https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0),
), ),
Container(margin: const EdgeInsets.only(top: 8.0), child: Text(widget.itemModel.name, maxLines: 1, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, letterSpacing: -0.56))), Container(margin: const EdgeInsets.only(top: 8.0), child: Text(widget.itemModel.name!, maxLines: 1, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, letterSpacing: -0.56))),
Container( Container(
width: MediaQuery.of(context).size.width * 0.4, width: MediaQuery.of(context).size.width * 0.4,
child: Text("Special discount for all HMG Employees and their first…", child: Text("Special discount for all HMG Employees and their first…",
maxLines: 2, style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, letterSpacing: -0.4, color: CustomColors.textColor), overflow: TextOverflow.clip)), maxLines: 2, style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, letterSpacing: -0.4, color: CustomColors.textColor), overflow: TextOverflow.clip)),
if (widget.itemModel.hasDiscountsApplied) if (widget.itemModel.hasDiscountsApplied!)
Container( Container(
margin: const EdgeInsets.only(top: 19.0), margin: const EdgeInsets.only(top: 19.0),
child: Text(widget.itemModel.oldPrice.toString() + " " + TranslationBase.of(context).sar, child: Text(widget.itemModel.oldPrice.toString() + " " + TranslationBase.of(context).sar,
style: TextStyle(fontSize: 9.0, fontWeight: FontWeight.w600, letterSpacing: -0.36, decoration: TextDecoration.lineThrough, color: CustomColors.grey2))), style: TextStyle(fontSize: 9.0, fontWeight: FontWeight.w600, letterSpacing: -0.36, decoration: TextDecoration.lineThrough, color: CustomColors.grey2))),
Container( Container(
margin: widget.itemModel.hasDiscountsApplied ? const EdgeInsets.only(top: 0.0) : const EdgeInsets.only(top: 19.0), margin: widget.itemModel.hasDiscountsApplied! ? const EdgeInsets.only(top: 0.0) : const EdgeInsets.only(top: 19.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

@ -40,13 +40,13 @@ class PackagesOrderHistoryItemCardState extends State<PackagesOrderHistoryItemCa
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
_itemName(widget.itemModel.name), _itemName(widget.itemModel.name!),
Expanded(child: _itemDescription(widget.itemModel.shortDescription)), Expanded(child: _itemDescription(widget.itemModel.shortDescription!)),
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_itemPrice(widget.itemModel.price, context: context), _itemPrice(widget.itemModel.price!, context: context),
_cancelButton(context, itemModel: widget.itemModel) _cancelButton(context, itemModel: widget.itemModel)
], ],
), ),
@ -85,7 +85,7 @@ Widget _cancelButton(BuildContext context, {required PackagesResponseModel itemM
Widget _image(PackagesResponseModel model) => AspectRatio( Widget _image(PackagesResponseModel model) => AspectRatio(
aspectRatio: 1 / 1, aspectRatio: 1 / 1,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(15), child: ((model.images ?? []).isNotEmpty) ? Utils.loadNetworkImage(url: model.images.first.src, fitting: BoxFit.fill) : Container(color: Colors.grey[200])), borderRadius: BorderRadius.circular(15), child: ((model.images ?? []).isNotEmpty) ? Utils.loadNetworkImage(url: model.images!.first.src!, fitting: BoxFit.fill) : Container(color: Colors.grey[200])),
); );
Widget _itemName(String name) => Text( Widget _itemName(String name) => Text(

@ -261,7 +261,7 @@ class OfferPackagesItemModel<T> {
}); });
var vm_products = locator<PackagesViewModel>(); var vm_products = locator<PackagesViewModel>();
vm_products.service.getAllProducts(request: OffersProductsRequestModel(categoryId: 125, limit: 100)).then((value) { vm_products.service.getAllProducts!( request: OffersProductsRequestModel(categoryId: 125, limit: 100)).then((value) {
print(value.toString()); print(value.toString());
print(value.toString()); print(value.toString());
}); });

@ -435,7 +435,7 @@ class _SearchBot extends State<BottomBarSearch> {
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) { res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((v) { v1['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName!);
arrDistance.add(new DoctorList.fromJson(v) arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters .projectDistanceInKiloMeters
.toString()); .toString());
@ -454,7 +454,7 @@ class _SearchBot extends State<BottomBarSearch> {
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName!);
arrDistance.add(new DoctorList.fromJson(v) arrDistance.add(new DoctorList.fromJson(v)
.projectDistanceInKiloMeters .projectDistanceInKiloMeters
.toString()); .toString());

@ -159,7 +159,7 @@ class _ProcedureListWidgetState extends State<ProcedureListWidget> {
if (query.isNotEmpty) { if (query.isNotEmpty) {
List<CategoriseParentModel> dummyListData = []; List<CategoriseParentModel> dummyListData = [];
dummySearchList.forEach((item) { dummySearchList.forEach((item) {
if (item.name.toLowerCase().contains(query.toLowerCase())) { if (item.name!.toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item); dummyListData.add(item);
} }
}); });

@ -763,7 +763,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) { res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((v) { v1['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName!);
arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString()); arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString());
}); });
}); });
@ -779,7 +779,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName!);
arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString()); arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString());
}); });

@ -89,7 +89,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) { builder: (BuildContext context) {
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset ? Image.asset(projectViewModel.isArabic ? image.imageAr : image.imageEn) : Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn)); child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!));
}, },
); );
}).toList(), }).toList(),
@ -181,7 +181,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) { builder: (BuildContext context) {
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset ? Image.asset(projectViewModel.isArabic ? image.imageAr : image.imageEn) : Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn)); child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!));
}, },
); );
}).toList(), }).toList(),
@ -292,7 +292,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) { builder: (BuildContext context) {
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset ? Image.asset(projectViewModel.isArabic ? image.imageAr : image.imageEn) : Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn)); child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!));
}, },
); );
}).toList(), }).toList(),

@ -23,9 +23,9 @@ class WeatherSlider extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding(padding: EdgeInsets.only(top: 10), child: AppText(data.name)), Padding(padding: EdgeInsets.only(top: 10), child: AppText(data.name!)),
AppText( AppText(
data.category, data.category!,
fontSize: 24, fontSize: 24,
), ),
Padding( Padding(
@ -54,7 +54,7 @@ class WeatherSlider extends StatelessWidget {
: grey, : grey,
borderRadius: BorderRadius.circular(10)), borderRadius: BorderRadius.circular(10)),
height: 15, height: 15,
width: (MediaQuery.of(context).size.width * (double.parse(data.value) / 10)), width: (MediaQuery.of(context).size.width * (double.parse(data.value!) / 10)),
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: SizedBox(), child: SizedBox(),
)), )),
@ -76,7 +76,7 @@ class WeatherSlider extends StatelessWidget {
shape: MessageBorder(), shape: MessageBorder(),
)), )),
top: 25, top: 25,
right: (MediaQuery.of(context).size.width * (double.parse(data.value) / 10)), right: (MediaQuery.of(context).size.width * (double.parse(data.value!) / 10)),
) )
: Positioned( : Positioned(
child: Container( child: Container(
@ -95,7 +95,7 @@ class WeatherSlider extends StatelessWidget {
shape: MessageBorder(), shape: MessageBorder(),
)), )),
top: 25, top: 25,
left: (MediaQuery.of(context).size.width * (double.parse(data.value) / 10)), left: (MediaQuery.of(context).size.width * (double.parse(data.value!) / 10)),
) )
], ],
), ),
@ -106,59 +106,59 @@ class WeatherSlider extends StatelessWidget {
? Row( ? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText(data.categoriesNames.category1, AppText(data.categoriesNames!.category1!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category1 == data.category && data.colorName == 'red' color: data.categoriesNames!.category1! == data.category && data.colorName == 'red'
? Colors.redAccent! ? Colors.redAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'orange' : data.categoriesNames!.category1 == data.category && data.colorName == 'orange'
? Colors.orangeAccent! ? Colors.orangeAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'green' : data.categoriesNames!.category1 == data.category && data.colorName == 'green'
? Colors.greenAccent! ? Colors.greenAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category1 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black!), : Colors.black!),
AppText(data.categoriesNames.category2, AppText(data.categoriesNames!.category2!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category2 == data.category && data.colorName == 'red' color: data.categoriesNames!.category2 == data.category && data.colorName == 'red'
? Colors.redAccent! ? Colors.redAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'orange' : data.categoriesNames!.category2 == data.category && data.colorName == 'orange'
? Colors.orangeAccent! ? Colors.orangeAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'green' : data.categoriesNames!.category2 == data.category && data.colorName == 'green'
? Colors.greenAccent! ? Colors.greenAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category2 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category3, AppText(data.categoriesNames!.category3!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category3 == data.category && data.colorName == 'red' color: data.categoriesNames!.category3 == data.category && data.colorName == 'red'
? Colors.redAccent! ? Colors.redAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'orange' : data.categoriesNames!.category3! == data.category && data.colorName == 'orange'
? Colors.orangeAccent! ? Colors.orangeAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'green' : data.categoriesNames!.category3 == data.category && data.colorName == 'green'
? Colors.greenAccent! ? Colors.greenAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category3 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category4, AppText(data.categoriesNames!.category4!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category4 == data.category && data.colorName == 'red' color: data.categoriesNames!.category4 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'orange' : data.categoriesNames!.category4 == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'green' : data.categoriesNames!.category4 == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category4 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category5, AppText(data.categoriesNames!.category5!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category5 == data.category && data.colorName == 'red' color: data.categoriesNames!.category5 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'orange' : data.categoriesNames!.category5! == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'green' : data.categoriesNames!.category5! == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category5 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
], ],
@ -166,59 +166,59 @@ class WeatherSlider extends StatelessWidget {
: Row( : Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText(data.categoriesNames.category5, AppText(data.categoriesNames!.category5!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category5 == data.category && data.colorName == 'red' color: data.categoriesNames!.category5 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'orange' : data.categoriesNames!.category5 == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'green' : data.categoriesNames!.category5 == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category5 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category4, AppText(data.categoriesNames!.category4!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category4 == data.category && data.colorName == 'red' color: data.categoriesNames!.category4 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'orange' : data.categoriesNames!.category4 == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'green' : data.categoriesNames!.category4 == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category4 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category3, AppText(data.categoriesNames!.category3!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category3 == data.category && data.colorName == 'red' color: data.categoriesNames!.category3 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'orange' : data.categoriesNames!.category3 == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'green' : data.categoriesNames!.category3 == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category3 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category2, AppText(data.categoriesNames!.category2!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category2 == data.category && data.colorName == 'red' color: data.categoriesNames!.category2 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'orange' : data.categoriesNames!.category2 == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'green' : data.categoriesNames!.category2! == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category2! == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
AppText(data.categoriesNames.category1, AppText(data.categoriesNames!.category1!,
fontSize: 12, fontSize: 12,
color: data.categoriesNames.category1 == data.category && data.colorName == 'red' color: data.categoriesNames!.category1 == data.category && data.colorName == 'red'
? Colors.redAccent ? Colors.redAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'orange' : data.categoriesNames!.category1! == data.category && data.colorName == 'orange'
? Colors.orangeAccent ? Colors.orangeAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'green' : data.categoriesNames!.category1! == data.category && data.colorName == 'green'
? Colors.greenAccent ? Colors.greenAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'yellow' : data.categoriesNames!.category1! == data.category && data.colorName == 'yellow'
? Colors.yellow[900]! ? Colors.yellow[900]!
: Colors.black), : Colors.black),
], ],

Loading…
Cancel
Save