Merge remote-tracking branch 'origin/dev_v3.13.6' into dev_v3.13.6

dev_v3.13.6_voipcall
devamirsaleemahmad 2 years ago
commit 50816d452e

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

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

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

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

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

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

@ -105,11 +105,11 @@ class _CarouselIndicatorState extends State<CarouselIndicator>
_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.
createAnimation(oldWidget.index.toDouble(), widget.index.toDouble());
createAnimation(oldWidget.index!.toDouble(), widget.index!.toDouble());
_animationController.forward();
} else {
_animationController.reset();
createAnimation(oldWidget.index.toDouble(), 0.0);
createAnimation(oldWidget.index!.toDouble(), 0.0);
_animationController.forward();
}
}
@ -155,7 +155,7 @@ abstract class BasePainter extends CustomPainter {
double height = widget.height;
double distance = width + space;
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(
RRect.fromRectAndRadius(
Rect.fromCenter(

@ -109,7 +109,7 @@ class LabResultWidget extends StatelessWidget {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value);
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)
// showConfirmMessage(context, projectViewModel.user.emailAddress, "yes")
},
cancelFunction: () => {showConfirmMessage(context, projectViewModel.user.emailAddress, "no")});
cancelFunction: () => {showConfirmMessage(context, projectViewModel.user!.emailAddress!, "no")});
dialog.showAlertDialog(context);
}
@ -144,7 +144,7 @@ class LabResultWidget extends StatelessWidget {
bool checkIfCovidLab(List<LabResult> labResultList) {
bool isCovidResult = false;
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;
covidLabResult = order;
}
@ -185,8 +185,8 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 12, right: projectViewModel.isArabic ? 12 : 0),
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].referanceRange, isLast: true, isCapitable: false, 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),
!checkIfCovidLab(patientLabResultList!)
? InkWell(
onTap: () {

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

@ -36,7 +36,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
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(
baseViewModel: model,
child: Column(
@ -44,19 +44,19 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.patientLabOrder!.doctorName,
widget.patientLabOrder!.doctorID,
widget.patientLabOrder!.doctorImageURL,
widget.patientLabOrder!.speciality,
widget.patientLabOrder!.doctorName!,
widget.patientLabOrder!.doctorID!,
widget.patientLabOrder!.doctorImageURL!,
widget.patientLabOrder!.speciality!,
widget.billNo!,
widget.patientLabOrder!.projectName,
widget.patientLabOrder!.orderDate,
widget.patientLabOrder!.projectName!,
widget.patientLabOrder!.orderDate!,
"",
widget.patientLabOrder!.nationalityFlagURL,
widget.patientLabOrder!.doctorRate,
widget.patientLabOrder!.actualDoctorRate,
widget.patientLabOrder!.noOfPatientsRate,
projectViewModel.user.emailAddress),
widget.patientLabOrder!.nationalityFlagURL!,
widget.patientLabOrder!.doctorRate!,
widget.patientLabOrder!.actualDoctorRate!,
widget.patientLabOrder!.noOfPatientsRate!,
projectViewModel.user!.emailAddress!),
onTap: widget.onTap!,
),
SizedBox(height: 10),

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

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

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

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

@ -204,7 +204,7 @@ class MyInAppBrowser extends InAppBrowser {
tamaraRequestModel.orderDescription = orderDesc;
tamaraRequestModel.isInstallment = true;
tamaraRequestModel.projectID = num.parse(projId);
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber;
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber!;
tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0";
tamaraRequestModel.customerName = patientName;
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!);
// getPatientData();
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));
} else {
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('INSTALLMENTS_VALUE', installments);
form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo);
form = form.replaceFirst('CUSTMOBILE_VALUE', authUser.mobileNumber);
form = form.replaceFirst('CUSTDOB_VALUE', DateUtil.getDayMonthYearDateFormatted(authUser.dateofBirthDataTime));
form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!);
form = form.replaceFirst('CUSTMOBILE_VALUE', authUser.mobileNumber!);
form = form.replaceFirst('CUSTDOB_VALUE', DateUtil.getDayMonthYearDateFormatted(authUser.dateofBirthDataTime!));
form = form.replaceFirst('CURRENCY_VALUE', authUser.outSA == 0 ? "SAR" : "AED");
form = form.replaceFirst('COUNTRY_CODE_VALUE', authUser.outSA == 0 ? "966" : "971");
@ -353,7 +353,7 @@ class MyInAppBrowser extends InAppBrowser {
Future<String> generatePharmacyURL(
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;
}

@ -42,12 +42,12 @@ class PackagesCartItemCardState extends State<PackagesCartItemCard> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_itemName(widget.itemModel.product.getName()),
Expanded(child: _itemDescription(widget.itemModel.product.shortDescription)),
Expanded(child: _itemDescription(widget.itemModel.product.shortDescription!)),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_itemPrice(widget.itemModel.product.price, context: context),
_itemPrice(widget.itemModel.product.price!, context: context),
InkWell(
onTap: () async {
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(
aspectRatio: 1 / 1,
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(

@ -24,7 +24,7 @@ class PackagesItemCard extends StatefulWidget {
}
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
Widget build(BuildContext context) {
@ -47,12 +47,12 @@ class PackagesItemCardState extends State<PackagesItemCard> {
aspectRatio: 144 / 144,
child: ClipRRect(
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),
Text(
widget.itemModel.name,
widget.itemModel.name!,
maxLines: 1,
style: TextStyle(
fontSize: 14.0,
@ -61,7 +61,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
color: Color(0xff2B353E),
),
),
Text(widget.itemModel.shortDescription,
Text(widget.itemModel.shortDescription!,
maxLines: 2,
style: TextStyle(
fontSize: 12.0,
@ -70,7 +70,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
color: Color(0xff535353),
),
overflow: TextOverflow.ellipsis),
if (widget.itemModel.hasDiscountsApplied)
if (widget.itemModel.hasDiscountsApplied!)
Container(
margin: const EdgeInsets.only(top: 19.0),
child: Text(
@ -85,7 +85,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
),
),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -146,18 +146,18 @@ class PackagesItemCardState extends State<PackagesItemCard> {
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),
),
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(
width: MediaQuery.of(context).size.width * 0.4,
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)),
if (widget.itemModel.hasDiscountsApplied)
if (widget.itemModel.hasDiscountsApplied!)
Container(
margin: const EdgeInsets.only(top: 19.0),
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))),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [

@ -40,13 +40,13 @@ class PackagesOrderHistoryItemCardState extends State<PackagesOrderHistoryItemCa
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_itemName(widget.itemModel.name),
Expanded(child: _itemDescription(widget.itemModel.shortDescription)),
_itemName(widget.itemModel.name!),
Expanded(child: _itemDescription(widget.itemModel.shortDescription!)),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_itemPrice(widget.itemModel.price, context: context),
_itemPrice(widget.itemModel.price!, context: context),
_cancelButton(context, itemModel: widget.itemModel)
],
),
@ -85,7 +85,7 @@ Widget _cancelButton(BuildContext context, {required PackagesResponseModel itemM
Widget _image(PackagesResponseModel model) => AspectRatio(
aspectRatio: 1 / 1,
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(

@ -261,7 +261,7 @@ class OfferPackagesItemModel<T> {
});
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());
});

@ -435,7 +435,7 @@ class _SearchBot extends State<BottomBarSearch> {
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((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());
@ -454,7 +454,7 @@ class _SearchBot extends State<BottomBarSearch> {
res['DoctorList'].forEach((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());

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

@ -763,7 +763,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((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());
});
});
@ -779,7 +779,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
res['DoctorList'].forEach((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());
});

@ -89,7 +89,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) {
return SizedBox(
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(),
@ -181,7 +181,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) {
return SizedBox(
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(),
@ -292,7 +292,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context) {
return SizedBox(
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(),

@ -23,9 +23,9 @@ class WeatherSlider extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding: EdgeInsets.only(top: 10), child: AppText(data.name)),
Padding(padding: EdgeInsets.only(top: 10), child: AppText(data.name!)),
AppText(
data.category,
data.category!,
fontSize: 24,
),
Padding(
@ -54,7 +54,7 @@ class WeatherSlider extends StatelessWidget {
: grey,
borderRadius: BorderRadius.circular(10)),
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),
child: SizedBox(),
)),
@ -76,7 +76,7 @@ class WeatherSlider extends StatelessWidget {
shape: MessageBorder(),
)),
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(
child: Container(
@ -95,7 +95,7 @@ class WeatherSlider extends StatelessWidget {
shape: MessageBorder(),
)),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(data.categoriesNames.category1,
AppText(data.categoriesNames!.category1!,
fontSize: 12,
color: data.categoriesNames.category1 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category1! == data.category && data.colorName == 'red'
? Colors.redAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category1 == data.category && data.colorName == 'orange'
? Colors.orangeAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'green'
: data.categoriesNames!.category1 == data.category && data.colorName == 'green'
? Colors.greenAccent!
: data.categoriesNames.category1 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category1 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black!),
AppText(data.categoriesNames.category2,
AppText(data.categoriesNames!.category2!,
fontSize: 12,
color: data.categoriesNames.category2 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category2 == data.category && data.colorName == 'red'
? Colors.redAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category2 == data.category && data.colorName == 'orange'
? Colors.orangeAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'green'
: data.categoriesNames!.category2 == data.category && data.colorName == 'green'
? Colors.greenAccent!
: data.categoriesNames.category2 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category2 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category3,
AppText(data.categoriesNames!.category3!,
fontSize: 12,
color: data.categoriesNames.category3 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category3 == data.category && data.colorName == 'red'
? Colors.redAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category3! == data.category && data.colorName == 'orange'
? Colors.orangeAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'green'
: data.categoriesNames!.category3 == data.category && data.colorName == 'green'
? Colors.greenAccent!
: data.categoriesNames.category3 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category3 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category4,
AppText(data.categoriesNames!.category4!,
fontSize: 12,
color: data.categoriesNames.category4 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category4 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category4 == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'green'
: data.categoriesNames!.category4 == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category4 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category5,
AppText(data.categoriesNames!.category5!,
fontSize: 12,
color: data.categoriesNames.category5 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category5 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category5! == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'green'
: data.categoriesNames!.category5! == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category5 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
],
@ -166,59 +166,59 @@ class WeatherSlider extends StatelessWidget {
: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(data.categoriesNames.category5,
AppText(data.categoriesNames!.category5!,
fontSize: 12,
color: data.categoriesNames.category5 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category5 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category5 == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'green'
: data.categoriesNames!.category5 == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category5 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category5 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category4,
AppText(data.categoriesNames!.category4!,
fontSize: 12,
color: data.categoriesNames.category4 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category4 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category4 == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'green'
: data.categoriesNames!.category4 == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category4 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category4 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category3,
AppText(data.categoriesNames!.category3!,
fontSize: 12,
color: data.categoriesNames.category3 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category3 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category3 == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'green'
: data.categoriesNames!.category3 == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category3 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category3 == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category2,
AppText(data.categoriesNames!.category2!,
fontSize: 12,
color: data.categoriesNames.category2 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category2 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category2 == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'green'
: data.categoriesNames!.category2! == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category2 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category2! == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
AppText(data.categoriesNames.category1,
AppText(data.categoriesNames!.category1!,
fontSize: 12,
color: data.categoriesNames.category1 == data.category && data.colorName == 'red'
color: data.categoriesNames!.category1 == data.category && data.colorName == 'red'
? Colors.redAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'orange'
: data.categoriesNames!.category1! == data.category && data.colorName == 'orange'
? Colors.orangeAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'green'
: data.categoriesNames!.category1! == data.category && data.colorName == 'green'
? Colors.greenAccent
: data.categoriesNames.category1 == data.category && data.colorName == 'yellow'
: data.categoriesNames!.category1! == data.category && data.colorName == 'yellow'
? Colors.yellow[900]!
: Colors.black),
],

Loading…
Cancel
Save