Merge branch 'dev_v3.13.6' of http://34.17.52.79/Haroon6138/diplomatic-quarter into dev_v3.13.6

merge-update-with-lab-changes
Sultan khan 2 years ago
commit 6a6ac76973

@ -7,9 +7,9 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class ConfirmCancelOrderDialog extends StatefulWidget { class ConfirmCancelOrderDialog extends StatefulWidget {
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
final Function onTap; final Function? onTap;
ConfirmCancelOrderDialog({Key key, this.model, this.onTap}); ConfirmCancelOrderDialog({Key? key, required this.model, this.onTap});
@override @override
_ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState(); _ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState();
@ -77,7 +77,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
widget.onTap(); widget.onTap!();
Navigator.pop(context); Navigator.pop(context);
}, },
child: Padding( child: Padding(

@ -28,12 +28,12 @@ import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class LocationPage extends StatefulWidget { class LocationPage extends StatefulWidget {
final Function(PickResult) onPick; final Function(PickResult)? onPick;
// final double latitude; // final double latitude;
// final double longitude; // final double longitude;
final dynamic model; final dynamic model;
const LocationPage({Key key, this.onPick, this.model}) : super(key: key); const LocationPage({Key? key, this.onPick, this.model}) : super(key: key);
@override @override
_LocationPageState createState() => _LocationPageState(); _LocationPageState createState() => _LocationPageState();
@ -44,22 +44,22 @@ class _LocationPageState extends State<LocationPage> {
double longitude = 0; double longitude = 0;
bool showCurrentLocation = false; bool showCurrentLocation = false;
GoogleMapController mapController; GoogleMapController? mapController;
bool isHuawei = false; bool isHuawei = false;
AppMap appMap; late AppMap appMap;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
static CameraPosition _kGooglePlex = CameraPosition( static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962), target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746, zoom: 14.4746,
); );
LatLng currentPostion; late LatLng currentPostion;
// Completer<GoogleMapController> mapController = Completer(); // Completer<GoogleMapController> mapController = Completer();
Placemark selectedPlace; late Placemark selectedPlace;
HmsApiAvailability hmsApiAvailability; late HmsApiAvailability hmsApiAvailability;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -73,9 +73,10 @@ class _LocationPageState extends State<LocationPage> {
latitude = projectViewModel.latitude; latitude = projectViewModel.latitude;
longitude = projectViewModel.longitude; longitude = projectViewModel.longitude;
appMap = AppMap( appMap = AppMap(
_kGooglePlex.toMap(), //Changed By Aamir
_kGooglePlex.toMap() as Map<dynamic, dynamic>,
onCameraMove: (camera) { onCameraMove: (camera) {
_updatePosition(camera); _updatePosition(camera as CameraPosition);
}, },
onMapCreated: () { onMapCreated: () {
currentPostion = LatLng(projectViewModel.latitude, projectViewModel.longitude); currentPostion = LatLng(projectViewModel.latitude, projectViewModel.longitude);
@ -138,13 +139,13 @@ class _LocationPageState extends State<LocationPage> {
createdOnUtc: "", createdOnUtc: "",
id: "0", id: "0",
faxNumber: "", faxNumber: "",
phoneNumber: projectViewModel.user.mobileNumber, phoneNumber: projectViewModel.user!.mobileNumber,
province: selectedPlace.administrativeArea, province: selectedPlace.administrativeArea,
countryId: 69, countryId: 69,
latLong: latitude.toStringAsFixed(6) + "," + longitude.toStringAsFixed(6), latLong: latitude.toStringAsFixed(6) + "," + longitude.toStringAsFixed(6),
country: selectedPlace.country, country: selectedPlace.country,
zipPostalCode: selectedPlace.postalCode, zipPostalCode: selectedPlace.postalCode,
email: projectViewModel.user.emailAddress) email: projectViewModel.user!.emailAddress)
]), ]),
); );
await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
@ -189,28 +190,28 @@ class _LocationPageState extends State<LocationPage> {
AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
customer: Customer(addresses: [ customer: Customer(addresses: [
Addresses( Addresses(
address1: selectedPlace.formattedAddress, address1: selectedPlace!.formattedAddress,
address2: selectedPlace.formattedAddress, address2: selectedPlace!.formattedAddress,
customerAttributes: "", customerAttributes: "",
createdOnUtc: "", createdOnUtc: "",
id: "0", id: "0",
faxNumber: "", faxNumber: "",
phoneNumber: projectViewModel.user.mobileNumber, phoneNumber: projectViewModel.user!.mobileNumber,
countryId: 69, countryId: 69,
latLong: selectedPlace.geometry.location.lat.toString() + "," + selectedPlace.geometry.location.lng.toString(), latLong: selectedPlace.geometry!.location.lat.toString() + "," + selectedPlace.geometry!.location.lng.toString(),
email: projectViewModel.user.emailAddress) email: projectViewModel.user!.emailAddress)
]), ]),
); );
selectedPlace.addressComponents.forEach((e) { selectedPlace.addressComponents!.forEach((e) {
if (e.types.contains("country")) { if (e.types.contains("country")) {
addNewAddressRequestModel.customer.addresses[0].country = e.longName; addNewAddressRequestModel.customer!.addresses![0].country = e.longName;
} }
if (e.types.contains("postal_code")) { if (e.types.contains("postal_code")) {
addNewAddressRequestModel.customer.addresses[0].zipPostalCode = e.longName; addNewAddressRequestModel.customer!.addresses![0].zipPostalCode = e.longName;
} }
if (e.types.contains("locality")) { if (e.types.contains("locality")) {
addNewAddressRequestModel.customer.addresses[0].city = e.longName; addNewAddressRequestModel.customer!.addresses![0].city = e.longName;
} }
}); });
@ -252,8 +253,8 @@ class _LocationPageState extends State<LocationPage> {
} else { } else {
if (await PermissionService.isLocationEnabled()) { if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude; latitude = value!.latitude;
longitude = value.longitude; longitude = value!.longitude;
currentPostion = LatLng(latitude, longitude); currentPostion = LatLng(latitude, longitude);
setMap(); setMap();
}); });
@ -261,7 +262,7 @@ class _LocationPageState extends State<LocationPage> {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude; latitude = value!.latitude;
longitude = value.longitude; longitude = value.longitude;
currentPostion = LatLng(latitude, longitude); currentPostion = LatLng(latitude, longitude);
setMap(); setMap();
@ -269,7 +270,7 @@ class _LocationPageState extends State<LocationPage> {
}); });
} else { } else {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude; latitude = value!.latitude;
longitude = value.longitude; longitude = value.longitude;
setMap(); setMap();
}); });

@ -17,17 +17,17 @@ import 'package:provider/provider.dart';
class NewHomeHealthCareStepOnePage extends StatefulWidget { class NewHomeHealthCareStepOnePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel;
final Function changePageViewIndex; final Function? changePageViewIndex;
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
const NewHomeHealthCareStepOnePage({Key key, this.patientERInsertPresOrderRequestModel, this.model, this.changePageViewIndex}) : super(key: key); const NewHomeHealthCareStepOnePage({Key? key, required this.patientERInsertPresOrderRequestModel, required this.model, this.changePageViewIndex}) : super(key: key);
@override @override
_NewHomeHealthCareStepOnePageState createState() => _NewHomeHealthCareStepOnePageState(); _NewHomeHealthCareStepOnePageState createState() => _NewHomeHealthCareStepOnePageState();
} }
class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOnePage> { class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOnePage> {
PickResult _result; late PickResult _result;
@override @override
void initState() { void initState() {
@ -57,25 +57,25 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
child: Row( child: Row(
children: [ children: [
Checkbox( Checkbox(
value: isServiceSelected(num.tryParse(service.serviceID)), value: isServiceSelected(int.parse(service.serviceID!)),
activeColor: Color(0xffD02127), activeColor: Color(0xffD02127),
tristate: false, tristate: false,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (bool newValue) { onChanged: (bool? newValue) {
setState(() { setState(() {
if (!isServiceSelected(num.tryParse(service.serviceID))) if (!isServiceSelected(int.parse(service.serviceID!)))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList( widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.add(PatientERHHCInsertServicesList(
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length, recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.length,
serviceID: num.tryParse(service.serviceID), serviceID: int.parse(service.serviceID!),
serviceName: projectViewModel.isArabic ? service.textN : service.text)); serviceName: projectViewModel.isArabic ? service.textN : service.text));
else else
removeSelected(num.tryParse(service.serviceID)); removeSelected(int.parse(service.serviceID!));
}); });
}), }),
SizedBox(width: 6), SizedBox(width: 6),
Expanded( Expanded(
child: Text( child: Text(
projectViewModel.isArabic ? service.textN : service.text.toLowerCase()?.capitalize(), projectViewModel.isArabic ? service.textN! : service.text!.toLowerCase().capitalize(),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
@ -96,7 +96,7 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).next, TranslationBase.of(context).next,
(this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal) (this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.length == 0 || widget.model.state == ViewState.BusyLocal)
? null ? null
: () async { : () async {
widget.model.setState(ViewState.Busy); widget.model.setState(ViewState.Busy);
@ -122,7 +122,7 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
isServiceSelected(int serviceId) { isServiceSelected(int serviceId) {
Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.where((element) => serviceId == element.serviceID); widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.where((element) => serviceId == element.serviceID);
if (patientERHHCInsertServicesList.length > 0) { if (patientERHHCInsertServicesList.length > 0) {
return true; return true;
} }
@ -131,11 +131,11 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
removeSelected(int serviceId) { removeSelected(int serviceId) {
Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.where((element) => serviceId == element.serviceID); widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.where((element) => serviceId == element.serviceID);
if (patientERHHCInsertServicesList.length > 0) if (patientERHHCInsertServicesList.length > 0)
setState(() { setState(() {
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.remove(patientERHHCInsertServicesList.first); widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.remove(patientERHHCInsertServicesList.first);
}); });
} }
} }

@ -21,11 +21,11 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class NewHomeHealthCareStepThreePage extends StatefulWidget { class NewHomeHealthCareStepThreePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel;
final Function changePageViewIndex; final Function? changePageViewIndex;
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
NewHomeHealthCareStepThreePage({Key key, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, this.model}); NewHomeHealthCareStepThreePage({Key? key, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model});
@override @override
_NewHomeHealthCareStepThreePageState createState() => _NewHomeHealthCareStepThreePageState(); _NewHomeHealthCareStepThreePageState createState() => _NewHomeHealthCareStepThreePageState();
@ -42,17 +42,17 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
@override @override
void initState() { void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude != null) { if (widget.patientERInsertPresOrderRequestModel!.latitude != null) {
markers.clear(); markers.clear();
markers.add( markers.add(
Marker( Marker(
markerId: MarkerId( markerId: MarkerId(
widget.patientERInsertPresOrderRequestModel.latitude.hashCode.toString(), widget.patientERInsertPresOrderRequestModel!.latitude.hashCode.toString(),
), ),
position: LatLng(widget.patientERInsertPresOrderRequestModel.latitude, widget.patientERInsertPresOrderRequestModel.longitude)), position: LatLng(widget.patientERInsertPresOrderRequestModel!.latitude!, widget.patientERInsertPresOrderRequestModel!.longitude!)),
); );
_kGooglePlex = CameraPosition( _kGooglePlex = CameraPosition(
target: LatLng(widget.patientERInsertPresOrderRequestModel.latitude, widget.patientERInsertPresOrderRequestModel.longitude), target: LatLng(widget.patientERInsertPresOrderRequestModel!.latitude!, widget.patientERInsertPresOrderRequestModel!.longitude!),
zoom: 14.4746, zoom: 14.4746,
); );
} }
@ -116,13 +116,13 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Image.network( child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=" + "https://maps.googleapis.com/maps/api/staticmap?center=" +
widget.patientERInsertPresOrderRequestModel.latitude.toString() + widget.patientERInsertPresOrderRequestModel!.latitude.toString() +
"," + "," +
widget.patientERInsertPresOrderRequestModel.longitude.toString() + widget.patientERInsertPresOrderRequestModel!.longitude.toString() +
"&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" +
widget.patientERInsertPresOrderRequestModel.latitude.toString() + widget.patientERInsertPresOrderRequestModel!.latitude.toString() +
"," + "," +
widget.patientERInsertPresOrderRequestModel.longitude.toString() + widget.patientERInsertPresOrderRequestModel!.longitude.toString() +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
@ -141,7 +141,7 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
), ),
), ),
...List.generate( ...List.generate(
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length, widget.patientERInsertPresOrderRequestModel!.patientERHHCInsertServicesList!.length,
(index) => Container( (index) => Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -165,7 +165,7 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
), ),
), ),
Text( Text(
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList[index].serviceName, widget.patientERInsertPresOrderRequestModel!.patientERHHCInsertServicesList![index].serviceName!,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -198,7 +198,7 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
TranslationBase.of(context).confirm, TranslationBase.of(context).confirm,
() { () {
widget.model.setState(ViewState.Busy); widget.model.setState(ViewState.Busy);
widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel).then((value) { widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel!).then((value) {
widget.model.setState(ViewState.Idle); widget.model.setState(ViewState.Idle);
if (widget.model.state != ViewState.ErrorLocal) { if (widget.model.state != ViewState.ErrorLocal) {
if (widget.model.orderId != null) { if (widget.model.orderId != null) {

@ -27,14 +27,14 @@ import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'location_page.dart'; import 'location_page.dart';
class NewHomeHealthCareStepTowPage extends StatefulWidget { class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult) onPick; final Function(PickResult)? onPick;
final double latitude; final double? latitude;
final double longitude; final double? longitude;
final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel;
final Function changePageViewIndex; final Function? changePageViewIndex;
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
const NewHomeHealthCareStepTowPage({Key key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, this.model}) : super(key: key); const NewHomeHealthCareStepTowPage({Key? key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model}) : super(key: key);
@override @override
_NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState(); _NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState();
@ -43,25 +43,26 @@ class NewHomeHealthCareStepTowPage extends StatefulWidget {
class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowPage> { class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0; double latitude = 0;
double longitude = 0; double longitude = 0;
AddressInfo _selectedAddress; late AddressInfo _selectedAddress;
bool showCurrentLocation = false; bool showCurrentLocation = false;
final Set<Marker> markers = new Set(); final Set<Marker> markers = new Set();
AppMap appMap; late AppMap appMap;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
static CameraPosition _kGooglePlex = CameraPosition( static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962), target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746, zoom: 14.4746,
); );
LatLng currentPostion; late LatLng currentPostion;
Completer<GoogleMapController> mapController = Completer(); Completer<GoogleMapController> mapController = Completer();
LocationUtils locationUtils; late LocationUtils locationUtils;
@override @override
void initState() { void initState() {
appMap = AppMap( appMap = AppMap(
_kGooglePlex.toMap(), //Changed by Aamir
_kGooglePlex.toMap() as Map<dynamic, dynamic>,
onCameraMove: (camera) { onCameraMove: (camera) {
_updatePosition(camera); _updatePosition(camera as CameraPosition);
}, },
onMapCreated: () { onMapCreated: () {
_getUserLocation(); _getUserLocation();
@ -116,7 +117,7 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
} }
} }
setLatitudeAndLongitude({bool isSetState = false, String latLong}) { setLatitudeAndLongitude({bool isSetState = false, String? latLong}) {
if (latLong == null) { if (latLong == null) {
if (widget.model.addressesList.isEmpty) { if (widget.model.addressesList.isEmpty) {
setState(() { setState(() {
@ -128,7 +129,7 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
} }
if (!showCurrentLocation) { if (!showCurrentLocation) {
List latLongArr = latLong.split(','); List latLongArr = latLong!.split(',');
latitude = double.parse(latLongArr[0]); latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]); longitude = double.parse(latLongArr[1]);
@ -249,8 +250,8 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
TranslationBase.of(context).continues, TranslationBase.of(context).continues,
() { () {
setState(() { setState(() {
widget.patientERInsertPresOrderRequestModel.latitude = latitude; widget.patientERInsertPresOrderRequestModel!.latitude = latitude;
widget.patientERInsertPresOrderRequestModel.longitude = longitude; widget.patientERInsertPresOrderRequestModel!.longitude = longitude;
}); });
navigateTo( navigateTo(
@ -291,7 +292,7 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
String getAddressName() { String getAddressName() {
if (_selectedAddress != null) if (_selectedAddress != null)
return _selectedAddress.address1; return _selectedAddress.address1!;
else else
return TranslationBase.of(context).selectAddress; return TranslationBase.of(context).selectAddress;
} }

@ -19,7 +19,7 @@ import 'package:provider/provider.dart';
import 'new_Home_health_care_step_one_page.dart'; import 'new_Home_health_care_step_one_page.dart';
class NewHomeHealthCarePage extends StatefulWidget { class NewHomeHealthCarePage extends StatefulWidget {
NewHomeHealthCarePage({this.model}); NewHomeHealthCarePage({required this.model});
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
@ -28,10 +28,10 @@ class NewHomeHealthCarePage extends StatefulWidget {
} }
class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with TickerProviderStateMixin { class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with TickerProviderStateMixin {
PageController _controller; late PageController _controller;
int _currentIndex = 1; int _currentIndex = 1;
double _latitude; late double _latitude;
double _longitude; late double _longitude;
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = new PatientERInsertPresOrderRequestModel(); PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = new PatientERInsertPresOrderRequestModel();
@ -45,7 +45,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
_getCurrentLocation() async { _getCurrentLocation() async {
if (await PermissionService.isLocationEnabled()) { if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
@ -55,7 +55,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
if (Platform.isAndroid) { if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
@ -64,7 +64,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
}); });
} else { } else {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
@ -169,12 +169,12 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
widget.model.pendingOrder.statusText, widget.model.pendingOrder!.statusText!,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 6), SizedBox(height: 6),
Text( Text(
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder.iD.toString()}', '${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder!.iD.toString()}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
), ),
Row( Row(
@ -186,7 +186,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
), ),
Expanded( Expanded(
child: Text( child: Text(
widget.model.pendingOrder.nearestProjectName.toString(), widget.model.pendingOrder!.nearestProjectName.toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
), ),
), ),
@ -200,14 +200,14 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created)), DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder!.created!)!),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 12), SizedBox(height: 12),
if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2) if (widget.model.pendingOrder!.statusId == 1 || widget.model.pendingOrder!.statusId == 2)
InkWell( InkWell(
onTap: () { onTap: () {
showConfirmMessage(widget.model, widget.model.pendingOrder); showConfirmMessage(widget.model, widget.model.pendingOrder!);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),

@ -4,10 +4,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class StepsWidget extends StatelessWidget { class StepsWidget extends StatelessWidget {
final int index; final int? index;
final Function changeCurrentTab; final Function? changeCurrentTab;
StepsWidget({Key key, this.index, this.changeCurrentTab}); StepsWidget({Key? key, this.index, this.changeCurrentTab});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -20,15 +20,15 @@ class StepsWidget extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
InkWell( InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab!(0),
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: containerColorRadiusBorder( decoration: containerColorRadiusBorder(
index == 0 index == 0
? CustomColors.accentColor ? CustomColors.accentColor
: index > 0 : index! > 0
? Colors.green[700] ? Colors.green[700]!
: Colors.white, : Colors.white,
2000, 2000,
Colors.black), Colors.black),
@ -45,15 +45,15 @@ class StepsWidget extends StatelessWidget {
), ),
Expanded(child: mDivider(Colors.grey)), Expanded(child: mDivider(Colors.grey)),
InkWell( InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index! >= 2 ? changeCurrentTab!(1) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: containerColorRadiusBorder( decoration: containerColorRadiusBorder(
index == 1 index == 1
? CustomColors.accentColor ? CustomColors.accentColor
: index > 1 : index! > 1
? Colors.green[700] ? Colors.green[700]!
: Colors.white, : Colors.white,
2000, 2000,
Colors.black), Colors.black),
@ -70,7 +70,7 @@ class StepsWidget extends StatelessWidget {
), ),
Expanded(child: mDivider(Colors.grey)), Expanded(child: mDivider(Colors.grey)),
InkWell( InkWell(
onTap: () => index == 2 ? changeCurrentTab(3) : null, onTap: () => index == 2 ? changeCurrentTab!(3) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,

@ -20,7 +20,7 @@ class HomeHealthCarePage extends StatefulWidget {
} }
class _HomeHealthCarePageState extends State<HomeHealthCarePage> with SingleTickerProviderStateMixin { class _HomeHealthCarePageState extends State<HomeHealthCarePage> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
@override @override
void initState() { void initState() {

@ -17,9 +17,9 @@ import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart'; import 'Dialog/confirm_cancel_order_dialog.dart';
class OrdersLogDetailsPage extends StatelessWidget { class OrdersLogDetailsPage extends StatelessWidget {
final HomeHealthCareViewModel model; final HomeHealthCareViewModel? model;
const OrdersLogDetailsPage({Key key, this.model}) : super(key: key); const OrdersLogDetailsPage({Key? key, this.model}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -50,16 +50,16 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: model, baseViewModel: model,
body: model.hhcAllPresOrders.length > 0 body: model!.hhcAllPresOrders.length > 0
? ListView.separated( ? ListView.separated(
padding: EdgeInsets.all(21), padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
GetCMCAllOrdersResponseModel order = model.hhcAllPresOrders.reversed.toList()[index]; GetCMCAllOrdersResponseModel order = model!.hhcAllPresOrders.reversed.toList()[index];
int status = order.statusId; int status = order.statusId!;
String _statusDisp = order.statusText; String _statusDisp = order.statusText!;
Color _color; Color? _color;
if (status == 1) { if (status == 1) {
//pending //pending
_color = Color(0xffCC9B14); _color = Color(0xffCC9B14);
@ -142,14 +142,14 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created)), DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created!)!),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 12), SizedBox(height: 12),
if (order.statusId == 1 || order.statusId == 2) if (order.statusId == 1 || order.statusId == 2)
InkWell( InkWell(
onTap: () { onTap: () {
showConfirmMessage(model, order); showConfirmMessage(model!, order);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
@ -172,7 +172,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
); );
}, },
separatorBuilder: (context, index) => SizedBox(height: 12), separatorBuilder: (context, index) => SizedBox(height: 12),
itemCount: model.hhcAllPresOrders.length) itemCount: model!.hhcAllPresOrders.length)
: getNoDataWidget(context), : getNoDataWidget(context),
); );
} }

@ -48,9 +48,9 @@ import 'h2o/h2o_page.dart';
class AllHabibMedicalService extends StatefulWidget { class AllHabibMedicalService extends StatefulWidget {
//TODO //TODO
final Function goToMyProfile; final Function? goToMyProfile;
AllHabibMedicalService({Key? key, required this.goToMyProfile}); AllHabibMedicalService({Key? key, this.goToMyProfile});
@override @override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();

@ -15,7 +15,7 @@ import 'components/SearchByClinic.dart';
class Search extends StatefulWidget { class Search extends StatefulWidget {
final int type; final int type;
final List? clnicIds; final List? clnicIds;
VoidCallbackAction? onBackClick; Function()? onBackClick;
Search({this.type = 0, this.clnicIds, this.onBackClick}); Search({this.type = 0, this.clnicIds, this.onBackClick});
@ -45,7 +45,7 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
showNewAppBar: true, showNewAppBar: true,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
backgroundColor: Color(0xFFF7F7F7), backgroundColor: Color(0xFFF7F7F7),
onTap: widget.onBackClick, onTap: widget.onBackClick!(),
body: Column( body: Column(
children: [ children: [
TabBar( TabBar(
@ -68,8 +68,8 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)], tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)],
onTap: (idx){ onTap: (idx) {
if(idx == 0) if (idx == 0)
projectViewModel.analytics.appointment.book_appointment_by_clinic(); projectViewModel.analytics.appointment.book_appointment_by_clinic();
else else
projectViewModel.analytics.appointment.book_appointment_by_doctor(); projectViewModel.analytics.appointment.book_appointment_by_doctor();

@ -16,9 +16,9 @@ class SearchResults extends StatefulWidget {
bool isLiveCareAppointment; bool isLiveCareAppointment;
bool isObGyneAppointment; bool isObGyneAppointment;
bool isDoctorNameSearch; bool isDoctorNameSearch;
OBGyneProcedureListResponse obGyneProcedureListResponse; OBGyneProcedureListResponse? obGyneProcedureListResponse;
SearchResults({required this.doctorsList, required this.patientDoctorAppointmentListHospital, this.isObGyneAppointment = false, this.isDoctorNameSearch = false, required this.isLiveCareAppointment, required this.obGyneProcedureListResponse}); SearchResults({required this.doctorsList, required this.patientDoctorAppointmentListHospital, this.isObGyneAppointment = false, this.isDoctorNameSearch = false, required this.isLiveCareAppointment, this.obGyneProcedureListResponse});
@override @override
_SearchResultsState createState() => _SearchResultsState(); _SearchResultsState createState() => _SearchResultsState();

@ -39,7 +39,7 @@ import 'package:provider/provider.dart';
class MyFamily extends StatefulWidget { class MyFamily extends StatefulWidget {
final bool isAppbarVisible; final bool isAppbarVisible;
VoidCallbackAction? onBackClick; Function()? onBackClick;
MyFamily({this.isAppbarVisible = true, this.onBackClick}); MyFamily({this.isAppbarVisible = true, this.onBackClick});
@ -91,7 +91,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
onTap: widget.isAppbarVisible == false ? widget.onBackClick : null, onTap: widget.isAppbarVisible == false ? widget.onBackClick!() : null,
icon: "assets/images/new/bottom_nav/family_files.svg", icon: "assets/images/new/bottom_nav/family_files.svg",
description: TranslationBase.of(context).familyInfo, description: TranslationBase.of(context).familyInfo,
body: Column( body: Column(

@ -1,71 +1,71 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AppointmentHistory { class AppointmentHistory {
String setupID; String? setupID;
int projectID; int? projectID;
int appointmentNo; int? appointmentNo;
DateTime appointmentDate; DateTime? appointmentDate;
dynamic appointmentDateN; dynamic appointmentDateN;
int appointmentType; int? appointmentType;
String bookDate; String? bookDate;
int patientType; int? patientType;
int patientID; int? patientID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
String endDate; String? endDate;
String startTime; String? startTime;
String endTime; String? endTime;
int status; int? status;
int visitType; int? visitType;
int visitFor; int? visitFor;
int patientStatusType; int? patientStatusType;
int companyID; int? companyID;
int bookedBy; int? bookedBy;
String bookedOn; String ?bookedOn;
int confirmedBy; int? confirmedBy;
String confirmedOn; String? confirmedOn;
int arrivalChangedBy; int? arrivalChangedBy;
DateTime arrivedOn; DateTime? arrivedOn;
dynamic editedBy; dynamic editedBy;
dynamic editedOn; dynamic editedOn;
dynamic doctorName; dynamic doctorName;
dynamic doctorNameN; dynamic doctorNameN;
String statusDesc; String? statusDesc;
dynamic statusDescN; dynamic statusDescN;
bool vitalStatus; bool? vitalStatus;
dynamic vitalSignAppointmentNo; dynamic vitalSignAppointmentNo;
int episodeID; int? episodeID;
int actualDoctorRate; int? actualDoctorRate;
String clinicName; String? clinicName;
bool complainExists; bool? complainExists;
String doctorImageURL; String? doctorImageURL;
String doctorNameObj; String? doctorNameObj;
int doctorRate; int? doctorRate;
List<String> doctorSpeciality; List<String>? doctorSpeciality;
String doctorTitle; String? doctorTitle;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool iSAllowOnlineCheckedIN; bool? iSAllowOnlineCheckedIN;
bool isActiveDoctor; bool? isActiveDoctor;
bool isActiveDoctorProfile; bool? isActiveDoctorProfile;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isExecludeDoctor; bool? isExecludeDoctor;
int isFollowup; int? isFollowup;
bool isLiveCareAppointment; bool? isLiveCareAppointment;
bool isMedicalReportRequested; bool? isMedicalReportRequested;
bool isOnlineCheckedIN; bool? isOnlineCheckedIN;
String latitude; String? latitude;
dynamic listHISGetContactLensPerscription; dynamic listHISGetContactLensPerscription;
dynamic listHISGetGlassPerscription; dynamic listHISGetGlassPerscription;
String longitude; String? longitude;
int nextAction; int? nextAction;
int noOfPatientsRate; int? noOfPatientsRate;
int originalClinicID; int? originalClinicID;
int originalProjectID; int? originalProjectID;
String projectName; String? projectName;
String qR; String? qR;
int remaniningHoursTocanPay; int? remaniningHoursTocanPay;
bool sMSButtonVisable; bool? sMSButtonVisable;
AppointmentHistory( AppointmentHistory(
{this.setupID, {this.setupID,

@ -8,7 +8,7 @@ class FeedbackDetails extends StatelessWidget {
final COCItem items; final COCItem items;
FeedbackDetails({ FeedbackDetails({
@required this.items, required this.items,
}); });
@override @override

@ -12,16 +12,16 @@ import 'package:flutter/material.dart';
import 'status_feedback_page.dart'; import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget { class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment; final AppoitmentAllHistoryResultList? appointment;
final MessageType messageType; final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); const FeedbackHomePage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
_FeedbackHomePageState createState() => _FeedbackHomePageState(); _FeedbackHomePageState createState() => _FeedbackHomePageState();
} }
class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerProviderStateMixin { class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
@override @override
void initState() { void initState() {
@ -72,7 +72,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerPr
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
SendFeedbackPage( SendFeedbackPage(
appointment: widget.appointment, appointment: widget.appointment!,
messageType: widget.messageType, messageType: widget.messageType,
), ),
StatusFeedbackPage() StatusFeedbackPage()

@ -29,10 +29,10 @@ import 'package:provider/provider.dart';
// import 'package:speech_to_text/speech_to_text.dart' as stt; // import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget { class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment; final AppoitmentAllHistoryResultList? appointment;
final MessageType messageType; final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); const SendFeedbackPage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
_SendFeedbackPageState createState() => _SendFeedbackPageState(); _SendFeedbackPageState createState() => _SendFeedbackPageState();
@ -42,10 +42,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
TextEditingController messageController = TextEditingController(); TextEditingController messageController = TextEditingController();
List<String> images = []; List<String> images = [];
String title; late String title;
AppoitmentAllHistoryResultList appointHistory; late AppoitmentAllHistoryResultList appointHistory;
bool isShowListAppointHistory = true; bool isShowListAppointHistory = true;
String message; late String message;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
MessageType messageType = MessageType.NON; MessageType messageType = MessageType.NON;
var _currentLocaleId; var _currentLocaleId;
@ -83,7 +83,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
setMessageType(MessageType messageType) { setMessageType(MessageType messageType) {
setState(() { setState(() {
this.messageType = messageType; this.messageType = messageType;
this.appointHistory = widget.appointment; this.appointHistory = widget.appointment!;
}); });
} }
@ -91,7 +91,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
void initState() { void initState() {
setState(() { setState(() {
this.messageType = widget.messageType; this.messageType = widget.messageType;
this.appointHistory = widget.appointment; this.appointHistory = widget.appointment!;
}); });
// requestPermissions(); // requestPermissions();
event.controller.stream.listen((p) { event.controller.stream.listen((p) {
@ -176,14 +176,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
child: DoctorCard( child: DoctorCard(
onTap: null, onTap: null,
isInOutPatient: appointHistory.isInOutPatient, isInOutPatient: appointHistory.isInOutPatient,
name: appointHistory.doctorTitle + " " + appointHistory.doctorNameObj, name: appointHistory.doctorTitle! + " " + appointHistory.doctorNameObj!,
// billNo: _appointmentResult.invoiceNo, // billNo: _appointmentResult.invoiceNo,
profileUrl: appointHistory.doctorImageURL, profileUrl: appointHistory.doctorImageURL,
subName: appointHistory.projectName, subName: appointHistory.projectName,
isLiveCareAppointment: appointHistory.isLiveCareAppointment, isLiveCareAppointment: appointHistory.isLiveCareAppointment,
date: DateUtil.convertStringToDate(appointHistory.appointmentDate), date: DateUtil.convertStringToDate(appointHistory.appointmentDate!),
rating: appointHistory.actualDoctorRate + 0.0, rating: appointHistory.actualDoctorRate! + 0.0,
appointmentTime: appointHistory.startTime.substring(0, 5), appointmentTime: appointHistory.startTime!.substring(0, 5),
), ),
), ),
SizedBox(height: 12), SizedBox(height: 12),
@ -204,13 +204,13 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
child: DoctorCard( child: DoctorCard(
onTap: null, onTap: null,
isInOutPatient: appoList[index].isInOutPatient, isInOutPatient: appoList[index].isInOutPatient,
name: appoList[index].doctorTitle + " " + appoList[index].doctorNameObj, name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
profileUrl: appoList[index].doctorImageURL, profileUrl: appoList[index].doctorImageURL,
subName: appoList[index].projectName, subName: appoList[index].projectName,
isLiveCareAppointment: appoList[index].isLiveCareAppointment, isLiveCareAppointment: appoList[index].isLiveCareAppointment,
date: DateUtil.convertStringToDate(appoList[index].appointmentDate), date: DateUtil.convertStringToDate(appoList[index].appointmentDate!),
rating: appoList[index].actualDoctorRate + 0.0, rating: appoList[index].actualDoctorRate! + 0.0,
appointmentTime: appoList[index].startTime.substring(0, 5), appointmentTime: appoList[index].startTime!.substring(0, 5),
), ),
), ),
), ),
@ -313,7 +313,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
? null ? null
: () { : () {
final form = formKey.currentState; final form = formKey.currentState;
if (form.validate()) { if (form!.validate()) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
model model
.sendCOCItem( .sendCOCItem(
@ -351,7 +351,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
); );
} }
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {VoidCallback suffixTap, bool isEnable = true, bool hasSelection = false, int lines}) { Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines}) {
return Container( return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center, alignment: Alignment.center,
@ -494,7 +494,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
setState(() { setState(() {
appointHistory = null; appointHistory = AppoitmentAllHistoryResultList();
isShowListAppointHistory = true; isShowListAppointHistory = true;
}); });
} else {} } else {}

@ -29,7 +29,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
TextEditingController complainNumberController = TextEditingController(); TextEditingController complainNumberController = TextEditingController();
StatusType statusType = StatusType.ComplaintNumber; StatusType statusType = StatusType.ComplaintNumber;
int selectedStatusIndex = 3; int selectedStatusIndex = 3;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -243,22 +243,22 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(isArabic ? cOCItemList[index].statusAr : cOCItemList[index].status, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), Text(isArabic ? cOCItemList[index].statusAr! : cOCItemList[index].status!, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)),
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text(cOCItemList[index].formType.toString(), child: Text(cOCItemList[index].formType.toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))),
MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic),
Text(cOCItemList[index].cOCTitle, Text(cOCItemList[index].cOCTitle!,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)),
], ],
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text(cOCItemList[index].date.split(" ")[0], Text(cOCItemList[index].date!.split(" ")[0],
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)),
Text(cOCItemList[index].date.split(" ")[1].substring(0, 4), Text(cOCItemList[index].date!.split(" ")[1].substring(0, 4),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)),
], ],
), ),
@ -272,7 +272,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
} }
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller,
{VoidCallback suffixTap, bool isEnable = true, bool hasSelection = false, int lines, bool isInputTypeNum = false}) { {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) {
return Container( return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center, alignment: Alignment.center,

@ -17,7 +17,7 @@ class AttachInsuranceCardImageDialog extends StatefulWidget {
final String mobileNo; final String mobileNo;
final Function(File file, String image) image; final Function(File file, String image) image;
const AttachInsuranceCardImageDialog({Key key, this.name, this.fileNo, this.identificationNo, this.mobileNo, this.image}) : super(key: key); const AttachInsuranceCardImageDialog({Key? key, required this.name, required this.fileNo, required this.identificationNo, required this.mobileNo, required this.image}) : super(key: key);
@override @override
_AttachInsuranceCardImageDialogState createState() => _AttachInsuranceCardImageDialogState(); _AttachInsuranceCardImageDialogState createState() => _AttachInsuranceCardImageDialogState();
@ -29,8 +29,8 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
super.initState(); super.initState();
} }
String image; late String image;
File file; late File file;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -150,7 +150,7 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
page: UpdateInsuranceManually( page: UpdateInsuranceManually(
patientIdentificationNo: widget.identificationNo, patientIdentificationNo: widget.identificationNo,
patientMobileNumber: widget.mobileNo, patientMobileNumber: widget.mobileNo,
patientID: num.parse(widget.fileNo), patientID: int.parse(widget.fileNo),
), ),
), ),
); );

@ -20,7 +20,7 @@ class UpdateInsuranceManually extends StatefulWidget {
String patientMobileNumber; String patientMobileNumber;
int patientID; int patientID;
UpdateInsuranceManually({@required this.patientIdentificationNo, @required this.patientMobileNumber, @required this.patientID}); UpdateInsuranceManually({required this.patientIdentificationNo, required this.patientMobileNumber, required this.patientID});
@override @override
State<UpdateInsuranceManually> createState() => _UpdateInsuranceManuallyState(); State<UpdateInsuranceManually> createState() => _UpdateInsuranceManuallyState();
@ -31,7 +31,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
TextEditingController _cardHolderNameTextController = TextEditingController(); TextEditingController _cardHolderNameTextController = TextEditingController();
TextEditingController _membershipNoTextController = TextEditingController(); TextEditingController _membershipNoTextController = TextEditingController();
TextEditingController _policyNoTextController = TextEditingController(); TextEditingController _policyNoTextController = TextEditingController();
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>(); InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@ -41,8 +41,8 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
int _selectedInsuranceCompanyIndex = -1; int _selectedInsuranceCompanyIndex = -1;
int _selectedInsuranceCompanySchemeIndex = -1; int _selectedInsuranceCompanySchemeIndex = -1;
InsuranceCompaniesGetModel selectedInsuranceCompanyObj; late InsuranceCompaniesGetModel selectedInsuranceCompanyObj;
InsuranceCompaniesSchemeModel selectedInsuranceCompaniesSchemesObj; late InsuranceCompaniesSchemeModel selectedInsuranceCompaniesSchemesObj;
@override @override
void initState() { void initState() {
@ -92,7 +92,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
selectedInsuranceCompanyObj != null ? selectedInsuranceCompanyObj.companyName : TranslationBase.of(context).insuranceCompany, selectedInsuranceCompanyObj != null ? selectedInsuranceCompanyObj.companyName! : TranslationBase.of(context).insuranceCompany,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -142,7 +142,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
selectedInsuranceCompaniesSchemesObj != null ? selectedInsuranceCompaniesSchemesObj.subCategoryDesc : TranslationBase.of(context).insuranceClassName, selectedInsuranceCompaniesSchemesObj != null ? selectedInsuranceCompaniesSchemesObj.subCategoryDesc! : TranslationBase.of(context).insuranceClassName,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -189,7 +189,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
void confirmSelectInsuranceCompanyDialog() { void confirmSelectInsuranceCompanyDialog() {
List<RadioSelectionDialogModel> list = [ List<RadioSelectionDialogModel> list = [
for (int i = 0; i < insuranceCompaniesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesList[i].companyName, i), for (int i = 0; i < insuranceCompaniesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesList[i].companyName!, i),
]; ];
showDialog( showDialog(
context: context, context: context,
@ -210,7 +210,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
void confirmSelectInsuranceCompanySchemeDialog() { void confirmSelectInsuranceCompanySchemeDialog() {
List<RadioSelectionDialogModel> list = [ List<RadioSelectionDialogModel> list = [
for (int i = 0; i < insuranceCompaniesSchemesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesSchemesList[i].subCategoryDesc, i), for (int i = 0; i < insuranceCompaniesSchemesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesSchemesList[i].subCategoryDesc!, i),
]; ];
showDialog( showDialog(
context: context, context: context,
@ -267,7 +267,7 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
void getInsuranceScheme() { void getInsuranceScheme() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceSchemes(selectedInsuranceCompanyObj.projectID, selectedInsuranceCompanyObj.companyID).then((value) { _insuranceCardService.getInsuranceSchemes(selectedInsuranceCompanyObj.projectID!, selectedInsuranceCompanyObj.companyID!).then((value) {
value.forEach((result) { value.forEach((result) {
insuranceCompaniesSchemesList.add(InsuranceCompaniesSchemeModel.fromJson(result)); insuranceCompaniesSchemesList.add(InsuranceCompaniesSchemeModel.fromJson(result));
}); });

@ -13,7 +13,7 @@ import 'package:provider/provider.dart';
class InsuranceApprovalDetail extends StatelessWidget { class InsuranceApprovalDetail extends StatelessWidget {
final InsuranceApprovalModel insuranceApprovalModel; final InsuranceApprovalModel insuranceApprovalModel;
InsuranceApprovalDetail({Key key, this.insuranceApprovalModel}) : super(key: key); InsuranceApprovalDetail({Key? key, required this.insuranceApprovalModel}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -45,11 +45,11 @@ class InsuranceApprovalDetail extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
insuranceApprovalModel.approvalStatusDescption, insuranceApprovalModel.approvalStatusDescption!,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: insuranceApprovalModel.status == 9 ? Color(0xff359846) : Color(0xffD02127), letterSpacing: -0.4, height: 18 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: insuranceApprovalModel.status == 9 ? Color(0xff359846) : Color(0xffD02127), letterSpacing: -0.4, height: 18 / 10),
), ),
Text( Text(
insuranceApprovalModel.doctorName, insuranceApprovalModel.doctorName!,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -62,8 +62,8 @@ class InsuranceApprovalDetail extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LargeAvatar( LargeAvatar(
name: insuranceApprovalModel.doctorName, name: insuranceApprovalModel.doctorName!,
url: insuranceApprovalModel.doctorImageURL, url: insuranceApprovalModel.doctorImageURL!,
width: 48, width: 48,
height: 48, height: 48,
), ),
@ -77,9 +77,9 @@ class InsuranceApprovalDetail extends StatelessWidget {
MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic),
SizedBox(height: 6), SizedBox(height: 6),
MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.receiptOn)) ?? "", MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.receiptOn!)) ?? "",
projectViewModel.isArabic), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.expiryDate)) ?? "", MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.expiryDate!)) ?? "",
projectViewModel.isArabic), projectViewModel.isArabic),
], ],
), ),

@ -19,7 +19,7 @@ import 'insurance_approval_detail_screen.dart';
class InsuranceApproval extends StatefulWidget { class InsuranceApproval extends StatefulWidget {
int appointmentNo; int appointmentNo;
InsuranceApproval({this.appointmentNo}); InsuranceApproval({required this.appointmentNo});
@override @override
_InsuranceApprovalState createState() => _InsuranceApprovalState(); _InsuranceApprovalState createState() => _InsuranceApprovalState();
@ -37,7 +37,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png')); .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(), onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(),
builder: (BuildContext _context, InsuranceViewModel model, Widget child) => AppScaffold( builder: (BuildContext _context, InsuranceViewModel model, Widget? child) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
baseViewModel: model, baseViewModel: model,
@ -54,10 +54,10 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Color _patientStatusColor; Color _patientStatusColor;
String _patientStatusString; String _patientStatusString;
if (model.insuranceApproval[index].isLiveCareAppointment) { if (model.insuranceApproval[index].isLiveCareAppointment!) {
_patientStatusColor = Color(0xff2E303A); _patientStatusColor = Color(0xff2E303A);
_patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach; _patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach;
} else if (!model.insuranceApproval[index].isInOutPatient) { } else if (!model.insuranceApproval[index].isInOutPatient!) {
_patientStatusColor = Color(0xffD02127); _patientStatusColor = Color(0xffD02127);
_patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach; _patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach;
} else { } else {
@ -108,7 +108,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
model.insuranceApproval[index].approvalStatusDescption, model.insuranceApproval[index].approvalStatusDescption!,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -117,7 +117,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 18 / 10), height: 18 / 10),
), ),
Text( Text(
model.insuranceApproval[index].doctorName, model.insuranceApproval[index].doctorName!,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -129,8 +129,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Row( Row(
children: [ children: [
LargeAvatar( LargeAvatar(
name: model.insuranceApproval[index].doctorName, name: model.insuranceApproval[index].doctorName!,
url: model.insuranceApproval[index].doctorImageURL, url: model.insuranceApproval[index].doctorImageURL!,
width: 48, width: 48,
height: 48, height: 48,
), ),
@ -140,9 +140,9 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName != null ? model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach : "", MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index].clinicName != null ? model.insuranceApproval[index].clinicName!.toLowerCase().capitalizeFirstofEach : "",
projectViewModel.isArabic), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index].approvalNo.toString() ?? "", projectViewModel.isArabic),
], ],
), ),
), ),

@ -21,7 +21,7 @@ import '../base/base_view.dart';
class InsuranceCard extends StatefulWidget { class InsuranceCard extends StatefulWidget {
int appointmentNo; int appointmentNo;
InsuranceCard({this.appointmentNo}); InsuranceCard({required this.appointmentNo});
@override @override
_InsuranceCardState createState() => _InsuranceCardState(); _InsuranceCardState createState() => _InsuranceCardState();
@ -38,7 +38,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsurance(), onModelReady: (model) => model.getInsurance(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
@ -76,12 +76,12 @@ class _InsuranceCardState extends State<InsuranceCard> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
model.insurance[index].groupName, model.insurance[index].groupName!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: -0.64), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: -0.64),
), ),
mHeight(8), mHeight(8),
Text( Text(
TranslationBase.of(context).companyName + model.insurance[index].companyName, TranslationBase.of(context).companyName + model.insurance[index].companyName!,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48),
), ),
Divider( Divider(
@ -99,7 +99,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
Text( Text(
model.insurance[index].subCategoryDesc, model.insurance[index].subCategoryDesc!,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
], ],
@ -112,7 +112,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
Text( Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo)), DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo!)),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
], ],
@ -147,7 +147,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
Text( Text(
model.insurance[index].patientCardID, model.insurance[index].patientCardID!,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
], ],
@ -160,7 +160,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
Text( Text(
model.insurance[index].insurancePolicyNumber, model.insurance[index].insurancePolicyNumber!,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
) )
], ],

@ -24,7 +24,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
final String name; final String name;
final String mobileNo; final String mobileNo;
const InsuranceCardUpdateDetails({Key key, this.insuranceCardDetailsModel, this.patientIdentificationID, this.patientID, this.name, this.mobileNo}) : super(key: key); const InsuranceCardUpdateDetails({Key? key, required this.insuranceCardDetailsModel, required this.patientIdentificationID, required this.patientID, required this.name, required this.mobileNo}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -61,7 +61,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
insuranceCardDetailsModel[index].memberID, insuranceCardDetailsModel[index].memberID!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -73,7 +73,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
height: 2, height: 2,
), ),
Text( Text(
insuranceCardDetailsModel[index].companyName, insuranceCardDetailsModel[index].companyName!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -100,7 +100,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
), ),
), ),
Text( Text(
insuranceCardDetailsModel[index].memberName, insuranceCardDetailsModel[index].memberName!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -123,7 +123,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
), ),
), ),
Text( Text(
insuranceCardDetailsModel[index].policyNumber, insuranceCardDetailsModel[index].policyNumber!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -154,7 +154,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
), ),
), ),
Text( Text(
insuranceCardDetailsModel[index].effectiveTo, insuranceCardDetailsModel[index].effectiveTo!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -177,7 +177,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
), ),
), ),
Text( Text(
insuranceCardDetailsModel[index].subCategory, insuranceCardDetailsModel[index].subCategory!,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -349,7 +349,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
); );
} }
void confirmAttachInsuranceCardImageDialogDialog({BuildContext context, String name, String fileNo, String identificationNo, String mobileNo, InsuranceViewModel model}) { void confirmAttachInsuranceCardImageDialogDialog({required BuildContext context, required String name, required String fileNo, required String identificationNo, required String mobileNo, required InsuranceViewModel model}) {
showDialog( showDialog(
context: context, context: context,
builder: (cxt) => AttachInsuranceCardImageDialog( builder: (cxt) => AttachInsuranceCardImageDialog(

@ -8,7 +8,7 @@ import 'package:flutter_html/flutter_html.dart';
class InsuranceCardDetails extends StatelessWidget { class InsuranceCardDetails extends StatelessWidget {
final String data; final String data;
InsuranceCardDetails({this.data}); InsuranceCardDetails({required this.data});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -18,9 +18,9 @@ class InsurancePage extends StatelessWidget {
final InsuranceViewModel model; final InsuranceViewModel model;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>(); InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
InsurancePage({Key key, this.model}) : super(key: key); InsurancePage({Key? key, required this.model}) : super(key: key);
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -41,15 +41,15 @@ class InsurancePage extends StatelessWidget {
getDetails( getDetails(
setupID: '010266', setupID: '010266',
projectID: 15, projectID: 15,
patientIdentificationID: projectViewModel.user.patientIdentificationNo, patientIdentificationID: projectViewModel.user!.patientIdentificationNo!,
//model.user.patientIdentificationNo, //model.user.patientIdentificationNo,
patientID: projectViewModel.user.patientID, patientID: projectViewModel.user!.patientID!,
//model.user.patientID, //model.user.patientID,
parentID: 0, parentID: 0,
isFamily: projectViewModel.isLoginChild, isFamily: projectViewModel.isLoginChild,
//false, //false,
name: projectViewModel.user.firstName + " " + projectViewModel.user.lastName, name: projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!,
mobileNumber: projectViewModel.user.mobileNumber, mobileNumber: projectViewModel.user!.mobileNumber!,
//model.user.firstName + " " + model.user.lastName, //model.user.firstName + " " + model.user.lastName,
context: context, context: context,
); );
@ -64,7 +64,7 @@ class InsurancePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -72,7 +72,7 @@ class InsurancePage extends StatelessWidget {
), ),
), ),
Text( Text(
TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), //model.user.patientID.toString(), TranslationBase.of(context).fileno + ": " + projectViewModel.user!.patientID.toString(), //model.user.patientID.toString(),
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -95,18 +95,18 @@ class InsurancePage extends StatelessWidget {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3 return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].status == 3
? InkWell( ? InkWell(
onTap: () { onTap: () {
getDetails( getDetails(
projectID: 15, projectID: 15,
patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientIdenficationNumber, patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientIdenficationNumber!,
setupID: '010266', setupID: '010266',
patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID, patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID!,
name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName, name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientName!,
parentID: model.user.patientID, parentID: model.user!.patientID!,
isFamily: true, isFamily: true,
mobileNumber: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].mobileNumber, mobileNumber: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].mobileNumber!,
context: context); context: context);
}, },
child: Container( child: Container(
@ -125,11 +125,11 @@ class InsurancePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].patientName, model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientName!,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46),
), ),
Text( Text(
TranslationBase.of(context).fileno + ": " + model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].responseID.toString(), TranslationBase.of(context).fileno + ": " + model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID.toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46),
), ),
], ],
@ -145,9 +145,9 @@ class InsurancePage extends StatelessWidget {
: Container(); : Container();
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return mHeight(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3 ? 8 : 0); return mHeight(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].status == 3 ? 8 : 0);
}, },
itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList!.length,
), ),
], ],
), ),
@ -155,7 +155,7 @@ class InsurancePage extends StatelessWidget {
); );
} }
getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, String mobileNumber, bool isFamily, int parentID = 0, BuildContext context}) { getDetails({required String setupID, required int projectID, required String patientIdentificationID, required int patientID, required String name, required String mobileNumber, required bool isFamily, int parentID = 0, required BuildContext context}) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService _insuranceCardService
.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID) .getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID)
@ -176,7 +176,7 @@ class InsurancePage extends StatelessWidget {
}); });
} else { } else {
// AppToast.showErrorToast(message: _insuranceCardService.error); // AppToast.showErrorToast(message: _insuranceCardService.error);
updateManually(context, _insuranceCardService.error, patientIdentificationID, patientID, mobileNumber); updateManually(context, _insuranceCardService.error!, patientIdentificationID, patientID, mobileNumber);
} }
}); });
} }

@ -17,9 +17,9 @@ class InsuranceUpdate extends StatefulWidget {
} }
class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProviderStateMixin { class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
List<ImagesInfo> imagesInfo =[]; List<ImagesInfo> imagesInfo =[];
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -39,7 +39,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsuranceUpdated(), onModelReady: (model) => model.getInsuranceUpdated(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold(
appBarTitle: TranslationBase.of(context).updateInsurCards, appBarTitle: TranslationBase.of(context).updateInsurCards,
description: TranslationBase.of(context).infoInsurCards, description: TranslationBase.of(context).infoInsurCards,
infoList: TranslationBase.of(context).infoPrescriptionsPoints, infoList: TranslationBase.of(context).infoPrescriptionsPoints,
@ -127,7 +127,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -146,7 +146,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
), ),
), ),
Text( Text(
model.insuranceUpdate[index].createdOn, model.insuranceUpdate[index].createdOn!,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -167,7 +167,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
Container( Container(
margin: EdgeInsets.only(top: 6.5, left: 2.0), margin: EdgeInsets.only(top: 6.5, left: 2.0),
child: Text( child: Text(
model.insuranceUpdate[index].statusDescription, model.insuranceUpdate[index].statusDescription!,
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -25,7 +25,7 @@ import 'package:provider/provider.dart';
class HomePageFragment2 extends StatefulWidget { class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model; DashboardViewModel model;
Function onPharmacyClick, onLoginClick, onMedicalFileClick; Function? onPharmacyClick, onLoginClick, onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick}); HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick});
@ -34,10 +34,10 @@ class HomePageFragment2 extends StatefulWidget {
} }
class _HomePageFragment2State extends State<HomePageFragment2> { class _HomePageFragment2State extends State<HomePageFragment2> {
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
List<HmgServices> hmgServices = []; List<HmgServices> hmgServices = [];
List<AppoitmentAllHistoryResultList> appoList = []; List<AppoitmentAllHistoryResultList> appoList = [];
ApplePayResponse applePayResponse; late ApplePayResponse applePayResponse;
@override @override
void initState() { void initState() {
@ -80,12 +80,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.onMedicalFileClick(); widget.onMedicalFileClick!();
}, },
child: LoggedSliderView( child: LoggedSliderView(
projectViewModel, projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + (projectViewModel.user?.patientID?.toString() ?? ""), new SliderData(TranslationBase.of(context).fileno + ": " + (projectViewModel.user?.patientID?.toString() ?? ""),
projectViewModel.user.firstName + ' ' + (projectViewModel.user?.lastName ?? ""), "", bannerColor[0].darkColor, bannerColor[0].lightColor), projectViewModel.user!.firstName! + ' ' + (projectViewModel.user?.lastName ?? ""), "", bannerColor[0].darkColor, bannerColor[0].lightColor),
widget.model, widget.model,
), ),
), ),
@ -97,7 +97,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: SliderView( child: SliderView(
onLoginClick: () { onLoginClick: () {
widget.onLoginClick(); widget.onLoginClick!();
projectViewModel.analytics.loginRegistration.login_register_initiate(); projectViewModel.analytics.loginRegistration.login_register_initiate();
}, },
), ),
@ -133,7 +133,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
), ),
TextButton( TextButton(
onPressed: () { onPressed: () {
widget.onMedicalFileClick(); widget.onMedicalFileClick!();
// navigateTo(context, MedicalProfilePageNew()); // navigateTo(context, MedicalProfilePageNew());
}, },
child: Text( child: Text(
@ -349,7 +349,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
Container( Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -417,7 +417,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick(); if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick!();
}, },
child: Stack(children: [ child: Stack(children: [
Container( Container(
@ -477,7 +477,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
Container( Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

@ -31,7 +31,7 @@ import 'landing_page_pharmcy.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
final Function goToMyProfile; final Function goToMyProfile;
HomePage({Key key, this.goToMyProfile}); HomePage({Key? key, required this.goToMyProfile});
@override @override
_HomePageState createState() => _HomePageState(); _HomePageState createState() => _HomePageState();
@ -86,7 +86,7 @@ class _HomePageState extends State<HomePage> {
), ),
color: Colors.white.withOpacity(0.3), color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))), borderRadius: BorderRadius.all(Radius.circular(5))),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user!.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
@ -133,7 +133,7 @@ class _HomePageState extends State<HomePage> {
elevation: 0, elevation: 0,
disabledForegroundColor: new Color(0xFFbcc2c4).withOpacity(0.38), disabledForegroundColor: new Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12), disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12),
onPressed: (model.user != null && model.user.outSA == 1) onPressed: (model.user != null && model.user!.outSA == 1)
? () {} ? () {}
: () { : () {
navigateToCovidDriveThru(); navigateToCovidDriveThru();
@ -268,11 +268,11 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
model.user.cRSVerificationStatus == 2 model.user!.cRSVerificationStatus == 2
? Row( ? Row(
children: [ children: [
Texts( Texts(
model.user.firstName + " " + model.user.lastName, model.user!.firstName! + " " + model.user!.lastName!,
color: Colors.grey[100], color: Colors.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
@ -283,11 +283,11 @@ class _HomePageState extends State<HomePage> {
), ),
], ],
) )
: model.user.cRSVerificationStatus == 3 : model.user!.cRSVerificationStatus == 3
? Row( ? Row(
children: [ children: [
Texts( Texts(
model.user.firstName + " " + model.user.lastName, model.user!.firstName! + " " + model.user!.lastName!,
color: Colors.grey[100], color: Colors.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
@ -301,7 +301,7 @@ class _HomePageState extends State<HomePage> {
: Row( : Row(
children: [ children: [
Texts( Texts(
model.user.firstName + " " + model.user.lastName, model.user!.firstName! + " " + model.user!.lastName!,
color: Colors.grey[100], color: Colors.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
@ -309,7 +309,7 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
Texts( Texts(
'${model.user.patientID}', '${model.user!.patientID!}',
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
), ),
@ -317,7 +317,7 @@ class _HomePageState extends State<HomePage> {
height: 5, height: 5,
), ),
Texts( Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user.age.toString() + "y"}', '${DateUtil.getMonthDayYearDateFormatted(model.user!.dateofBirthDataTime!)} ,${model.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user!.age.toString() + "y"}',
color: Colors.grey[100], color: Colors.grey[100],
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 14, fontSize: 14,
@ -414,7 +414,7 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15), padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(projectViewModel.user))); Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(projectViewModel.user!)));
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -447,7 +447,7 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
if (projectViewModel.havePrivilege(64)) if (projectViewModel.havePrivilege(64))
DashboardItem( DashboardItem(
onTap: (model.user != null && model.user.outSA == 1) onTap: (model.user != null && model.user!.outSA == 1)
? () {} ? () {}
: () { : () {
Navigator.push( Navigator.push(
@ -459,8 +459,8 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user!.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
@ -485,7 +485,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55, fontSize: SizeConfig.textMultiplier! * 1.55,
) )
], ],
)), )),
@ -496,11 +496,11 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(65)) if (projectViewModel.havePrivilege(65))
DashboardItem( DashboardItem(
onTap: () => (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model), onTap: () => (model.user != null && model.user!.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user!.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
@ -531,7 +531,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55, fontSize: SizeConfig.textMultiplier! * 1.55,
) )
], ],
), ),
@ -542,7 +542,7 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(67)) if (projectViewModel.havePrivilege(67))
DashboardItem( DashboardItem(
onTap: (model.user != null && model.user.outSA == 1) onTap: (model.user != null && model.user!.outSA == 1)
? () {} ? () {}
: () { : () {
Navigator.push( Navigator.push(
@ -554,8 +554,8 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user!.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
@ -580,7 +580,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55, fontSize: SizeConfig.textMultiplier! * 1.55,
) )
], ],
)), )),
@ -621,7 +621,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier! * 1.7,
) )
], ],
), ),
@ -657,7 +657,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier! * 1.7,
) )
], ],
), ),
@ -698,7 +698,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier! * 1.7,
) )
], ],
), ),
@ -755,7 +755,7 @@ class _HomePageState extends State<HomePage> {
height: 100, height: 100,
imageName: 'contact_us_bg.png', imageName: 'contact_us_bg.png',
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700]!,
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())), onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())),
), ),
@ -796,7 +796,7 @@ class _HomePageState extends State<HomePage> {
height: 100, height: 100,
imageName: 'contact_us_bg.png', imageName: 'contact_us_bg.png',
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700]!,
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
), ),
], ],
@ -833,22 +833,22 @@ class _HomePageState extends State<HomePage> {
} }
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {
const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true}) const DashboardItem({this.hasBorder = false, this.imageName, this.child, this.onTap, Key? key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String? imageName;
final Widget child; final Widget? child;
final Function onTap; final Function? onTap;
final double width; final double? width;
final double height; final double? height;
final Color color; final Color? color;
final double opacity; final double? opacity;
final bool hasColorFilter; final bool hasColorFilter;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
onTap: onTap, onTap: onTap!(),
child: Container( child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.29, width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
height: height != null height: height != null
@ -860,7 +860,7 @@ class DashboardItem extends StatelessWidget {
color: !hasBorder color: !hasBorder
? color != null ? color != null
? color ? color
: Color(0xFF050705).withOpacity(opacity) : Color(0xFF050705).withOpacity(opacity!)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),

@ -16,10 +16,10 @@ import 'fragments/home_page_fragment2.dart';
import 'landing_page_pharmcy.dart'; import 'landing_page_pharmcy.dart';
class HomePage2 extends StatefulWidget { class HomePage2 extends StatefulWidget {
final Function goToMyProfile; final Function? goToMyProfile;
Function onLoginClick, onMedicalFileClick; Function? onLoginClick, onMedicalFileClick;
HomePage2({Key key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick}); HomePage2({Key? key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick});
@override @override
_HomePageState2 createState() => _HomePageState2(); _HomePageState2 createState() => _HomePageState2();
@ -27,7 +27,7 @@ class HomePage2 extends StatefulWidget {
class _HomePageState2 extends State<HomePage2> { class _HomePageState2 extends State<HomePage2> {
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>(); PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -45,13 +45,13 @@ class _HomePageState2 extends State<HomePage2> {
HomePageFragment2( HomePageFragment2(
model, model,
onLoginClick: () { onLoginClick: () {
widget.onLoginClick(); widget.onLoginClick!();
}, },
onPharmacyClick: () { onPharmacyClick: () {
getPharmacyToken(model); getPharmacyToken(model);
}, },
onMedicalFileClick: () { onMedicalFileClick: () {
widget.onMedicalFileClick(); widget.onMedicalFileClick!();
}, },
) )
], ],

@ -50,8 +50,8 @@ import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
static LandingPage shared; static late LandingPage shared;
_LandingPageState state; late _LandingPageState state;
LandingPage() { LandingPage() {
LandingPage.shared = this; LandingPage.shared = this;
@ -73,16 +73,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider(); var authProvider = new AuthProvider();
int currentTab = 0; int currentTab = 0;
PageController pageController; late PageController pageController;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
ToDoCountProviderModel model; late ToDoCountProviderModel model;
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
DateTime currentBackPressTime; DateTime? currentBackPressTime;
// SignalRUtil signalRUtil; // SignalRUtil signalRUtil;
ToDoCountProviderModel toDoProvider; late ToDoCountProviderModel toDoProvider;
bool _showBottomNavigationBar = true; bool _showBottomNavigationBar = true;
@ -99,7 +99,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
final voIPKit = FlutterIOSVoIPKit.instance; final voIPKit = FlutterIOSVoIPKit.instance;
var dummyCallId = '123456'; var dummyCallId = '123456';
var dummyCallerName = 'Dummy Tester'; var dummyCallerName = 'Dummy Tester';
Timer timeOutTimer; late Timer timeOutTimer;
bool isTalking = false; bool isTalking = false;
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
@ -151,7 +151,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
bool isPageNavigated = false; bool isPageNavigated = false;
LocationUtils locationUtils; late LocationUtils locationUtils;
Future<bool> onWillPop() { Future<bool> onWillPop() {
if (currentTab != 0) { if (currentTab != 0) {
@ -159,7 +159,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return Future.value(false); return Future.value(false);
} else { } else {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
if (currentBackPressTime == null || now.difference(currentBackPressTime) > Duration(seconds: 2)) { if (currentBackPressTime == null || now.difference(currentBackPressTime!) > Duration(seconds: 2)) {
currentBackPressTime = now; currentBackPressTime = now;
AppToast.showToast(message: TranslationBase.of(context).pressAgain); AppToast.showToast(message: TranslationBase.of(context).pressAgain);
return Future.value(false); return Future.value(false);
@ -302,13 +302,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// for now commented to reduce this call will enable it when needed // for now commented to reduce this call will enable it when needed
// HMGNetworkConnectivity(context).start(); // HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String token) { _firebaseMessaging.getToken().then((String? token) {
print("Firebase Token: " + token); print("Firebase Token: " + token!);
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (Platform.isIOS) { if (Platform.isIOS) {
voIPKit.getVoIPToken().then((value) { voIPKit.getVoIPToken().then((value) {
print('🎈 example: getVoIPToken: $value'); print('🎈 example: getVoIPToken: $value');
AppSharedPreferences().setString(APNS_TOKEN, value); AppSharedPreferences().setString(APNS_TOKEN, value!);
getOneSignalVOIPToken(value); getOneSignalVOIPToken(value);
}); });
} }
@ -470,13 +470,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
elevation: 0, elevation: 0,
backgroundColor: CustomColors.backgroudGreyColor, backgroundColor: CustomColors.backgroudGreyColor,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), headline6: TextStyle(color: Theme.of(context).textTheme.headline1!.color, fontWeight: FontWeight.bold),
), ),
title: Text( title: Text(
getText(currentTab).toUpperCase(), getText(currentTab).toUpperCase(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color, color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1!.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// bold: true, // bold: true,
), ),
@ -487,7 +487,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
currentTab == 0 currentTab == 0
? IconButton( ? IconButton(
icon: SvgPicture.asset("assets/images/new/menu.svg"), icon: SvgPicture.asset("assets/images/new/menu.svg"),
color: Theme.of(context).textTheme.headline1.color, color: Theme.of(context).textTheme.headline1!.color,
onPressed: () => Scaffold.of(context).openDrawer(), onPressed: () => Scaffold.of(context).openDrawer(),
) )
: IconButton( : IconButton(
@ -647,14 +647,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount); model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); FlutterAppIconBadge.updateBadge(int.parse(notificationCount));
} }
}), }),
}); });
} }
projectViewModel.analytics.setUser(data); projectViewModel.analytics.setUser(data);
} else { } else {
projectViewModel.analytics.setUser(null); //changed by Aamir
projectViewModel.analytics.setUser(AuthenticatedUser());
} }
if (Platform.isIOS) { if (Platform.isIOS) {
String voipToken = await sharedPref.getString(APNS_TOKEN); String voipToken = await sharedPref.getString(APNS_TOKEN);

@ -26,15 +26,15 @@ import '../../locator.dart';
class LandingPagePharmacy extends StatefulWidget { class LandingPagePharmacy extends StatefulWidget {
final int currentTab; final int currentTab;
const LandingPagePharmacy({Key key, this.currentTab = 0}) : super(key: key); const LandingPagePharmacy({Key? key, this.currentTab = 0}) : super(key: key);
@override @override
_LandingPagePharmacyState createState() => _LandingPagePharmacyState(); _LandingPagePharmacyState createState() => _LandingPagePharmacyState();
} }
class _LandingPagePharmacyState extends State<LandingPagePharmacy> { class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
ProjectViewModel projectProvider; late ProjectViewModel projectProvider;
int currentTab = 0; int currentTab = 0;
PageController pageController; late PageController pageController;
void initState() { void initState() {
super.initState(); super.initState();
@ -88,7 +88,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
try { try {
ScanResult result = await BarcodeScanner.scan(); ScanResult result = await BarcodeScanner.scan();
try { try {
String barcode = result?.rawContent; String barcode = result.rawContent;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await BaseAppClient() await BaseAppClient()
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",

@ -122,7 +122,7 @@ class LoggedSliderView extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(left: 20, right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Text( child: Text(
'${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime)} ,${projectViewModel.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user.age.toString() + " " + TranslationBase.of(context).patientAge.toString()}', '${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user!.dateofBirthDataTime!)} ,${projectViewModel.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user!.age.toString() + " " + TranslationBase.of(context).patientAge.toString()}',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 12, fontSize: 12,

@ -7,7 +7,7 @@ class OfferView extends StatelessWidget {
return Container( return Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.width / 5, height: MediaQuery.of(context).size.width / 5,
decoration: containerColorRadiusBorderWidth(Colors.grey[200], 20, Colors.grey[300], 2), decoration: containerColorRadiusBorderWidth(Colors.grey[200]!, 20, Colors.grey[300]!, 2),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(

@ -1,12 +1,14 @@
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
class PharmacyView extends StatelessWidget { class PharmacyView extends StatelessWidget {
Function onPharmacyClick; Function onPharmacyClick;
PharmacyView({this.onPharmacyClick}); PharmacyView({required this.onPharmacyClick});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
@ -55,4 +57,9 @@ class PharmacyView extends StatelessWidget {
), ),
); );
} }
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties.add(DiagnosticsProperty<Function>('onPharmacyClick', onPharmacyClick));
}
} }

@ -48,7 +48,7 @@ class ServicesView extends StatelessWidget {
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>(); PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; late LocationUtils locationUtils;
bool isHomePage; bool isHomePage;
ServicesView(this.hmgServices, this.index, this.isHomePage); ServicesView(this.hmgServices, this.index, this.isHomePage);
@ -111,7 +111,7 @@ class ServicesView extends StatelessWidget {
Container( Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
padding: EdgeInsets.only(left: SizeConfig.widthMultiplier * 3, right: SizeConfig.widthMultiplier * 3, top: SizeConfig.widthMultiplier * 3, bottom: SizeConfig.widthMultiplier * 2), padding: EdgeInsets.only(left: SizeConfig.widthMultiplier! * 3, right: SizeConfig.widthMultiplier! * 3, top: SizeConfig.widthMultiplier! * 3, bottom: SizeConfig.widthMultiplier! * 2),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -137,7 +137,7 @@ class ServicesView extends StatelessWidget {
maxLines: 1, maxLines: 1,
minFontSize: 10, minFontSize: 10,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -0.39, letterSpacing: -0.39,
height: 0.8, height: 0.8,
@ -148,7 +148,7 @@ class ServicesView extends StatelessWidget {
maxLines: 1, maxLines: 1,
minFontSize: 8, minFontSize: 8,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier! * 1.4,
letterSpacing: -0.27, letterSpacing: -0.27,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),

@ -11,9 +11,9 @@ import 'package:provider/provider.dart';
class SliderView extends StatelessWidget { class SliderView extends StatelessWidget {
Function onLoginClick; Function onLoginClick;
SliderView({this.onLoginClick}); SliderView({required this.onLoginClick});
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -92,6 +92,7 @@ class SliderView extends StatelessWidget {
width: MediaQuery.of(context).size.width / (projectViewModel.isArabic ? 4 : 6), width: MediaQuery.of(context).size.width / (projectViewModel.isArabic ? 4 : 6),
child: CustomTextButton( child: CustomTextButton(
shape: cardRadiusNew(8), shape: cardRadiusNew(8),
//shape: OutlinedBorder(),
backgroundColor: Color(0xFFFBF2E31), backgroundColor: Color(0xFFFBF2E31),
elevation: 0, elevation: 0,
onPressed: () { onPressed: () {

@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ScheduleClinicCard extends StatefulWidget { class ScheduleClinicCard extends StatefulWidget {
bool isSelected; bool? isSelected;
final ClinicsHaveScheduleList clinicsHaveScheduleList; final ClinicsHaveScheduleList clinicsHaveScheduleList;
var languageID; var languageID;
ScheduleClinicCard({this.isSelected, this.languageID, @required this.clinicsHaveScheduleList}); ScheduleClinicCard({this.isSelected, this.languageID, required this.clinicsHaveScheduleList});
@override @override
_ScheduleClinicCardState createState() => _ScheduleClinicCardState(); _ScheduleClinicCardState createState() => _ScheduleClinicCardState();
@ -27,7 +27,7 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all(width: widget.isSelected ? 3 : 0, color: widget.isSelected ? CustomColors.green : Colors.transparent), border: Border.all(width: widget.isSelected! ? 3 : 0, color: widget.isSelected! ? CustomColors.green : Colors.transparent),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0xff000000).withOpacity(.05), color: Color(0xff000000).withOpacity(.05),
@ -48,11 +48,11 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: projectViewModel.isArabic left: projectViewModel.isArabic
? 0 ? 0
: widget.isSelected : widget.isSelected!
? 4 ? 4
: 6, : 6,
right: projectViewModel.isArabic right: projectViewModel.isArabic
? widget.isSelected ? widget.isSelected!
? 4 ? 4
: 6 : 6
: 0), : 0),

@ -471,7 +471,7 @@ BoxDecoration cardRadius(double radius, {Color? color, double? elevation}) {
); );
} }
ShapeBorder cardRadiusNew(double radius) { OutlinedBorder cardRadiusNew(double radius) {
return RoundedRectangleBorder( return RoundedRectangleBorder(
side: BorderSide(color: Colors.transparent, width: 0), side: BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.all(Radius.circular(radius)), borderRadius: BorderRadius.all(Radius.circular(radius)),

Loading…
Cancel
Save