update_flutter_3.16.0_voipcall
Aamir Muhammad 2 years ago
parent b83c48abe5
commit f977dc10a4

@ -133,7 +133,7 @@ abstract class BaseMovingFloatingWidget : Service() {
return true
}
override fun onDoubleTap(e: MotionEvent?): Boolean {
override fun onDoubleTap(e: MotionEvent): Boolean {
miniCircleDoubleTap()
return super.onDoubleTap(e)
}

@ -230,7 +230,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
handleDragDialog()
mDetector = GestureDetectorCompat(
context,
requireContext(),
MyGestureListener({ showControlPanelTemporarily() }, { miniCircleDoubleTap() })
)
@ -1152,7 +1152,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
return true
}
override fun onDoubleTap(e: MotionEvent?): Boolean {
override fun onDoubleTap(e: MotionEvent): Boolean {
miniCircleDoubleTap()
return super.onDoubleTap(e)
}

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@ -210,7 +210,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -255,10 +255,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@ -309,9 +311,6 @@
"${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
"${BUILT_PRODUCTS_DIR}/video_player_avfoundation/video_player_avfoundation.framework",
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@ -350,9 +349,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player_avfoundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@ -361,6 +357,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

@ -49,7 +49,7 @@ class CheckActivationCodeForDoctorAppResponseModel {
}
class ListDoctorsClinic {
Null setupID;
String? setupID;
int? projectID;
int? doctorID;
int? clinicID;
@ -85,8 +85,8 @@ class MemberInformation {
String? email;
int? employeeId;
int? memberId;
Null memberName;
Null memberNameArabic;
String? memberName;
String? memberNameArabic;
String? preferredLanguage;
List<Roles>? roles;

@ -3,7 +3,7 @@ class NewLoginInformationModel {
List<ListMemberInformation>? listMemberInformation;
String? logInTokenID;
String? mobileNumber;
Null? sELECTDeviceIMEIbyIMEIList;
String? sELECTDeviceIMEIbyIMEIList;
int? userID;
String? zipCode;
bool? isActiveCode;
@ -42,8 +42,7 @@ class NewLoginInformationModel {
final Map<String, dynamic> data = <String, dynamic>{};
data['DoctorID'] = doctorID;
if (listMemberInformation != null) {
data['List_MemberInformation'] =
listMemberInformation?.map((v) => v.toJson()).toList();
data['List_MemberInformation'] = listMemberInformation?.map((v) => v.toJson()).toList();
}
data['LogInTokenID'] = logInTokenID;
data['MobileNumber'] = mobileNumber;
@ -57,10 +56,10 @@ class NewLoginInformationModel {
}
class ListMemberInformation {
Null? setupID;
String? setupID;
int? memberID;
String? memberName;
Null? memberNameN;
String? memberNameN;
String? preferredLang;
String? pIN;
String? saltHash;

@ -1,19 +1,12 @@
class ClinicModel {
Null setupID;
String? setupID;
int? projectID;
int? doctorID;
int? clinicID;
bool? isActive;
String? clinicName;
ClinicModel(
{this.setupID,
this.projectID,
this.doctorID,
this.clinicID,
this.isActive,
this.clinicName});
ClinicModel({this.setupID, this.projectID, this.doctorID, this.clinicID, this.isActive, this.clinicName});
ClinicModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];

@ -106,7 +106,7 @@ class AuthenticationService extends BaseService {
try {
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
}, onFailure: (String? error, int statusCode) {
hasError = true;
super.error = error;
}, body: checkActivationCodeRequestModel.toJson());

@ -51,7 +51,7 @@ class AuthenticationViewModel extends BaseViewModel {
NewLoginInformationModel? loggedUser;
GetIMEIDetailsModel user = GetIMEIDetailsModel();
GetIMEIDetailsModel? user;
UserModel userInfo = UserModel();
final LocalAuthentication auth = LocalAuthentication();
@ -76,13 +76,11 @@ class AuthenticationViewModel extends BaseViewModel {
if (data != null) {
user = GetIMEIDetailsModel.fromJson(data);
}
var profileInfo = await sharedPref.getObj(DOCTOR_PROFILE);
profileInfo['IMEI'] = token;
profileInfo['LogInTypeID'] = await sharedPref.getInt(OTP_TYPE);
profileInfo['BioMetricEnabled'] = true;
profileInfo['MobileNo'] = loggedIn != null ? loggedIn['MobileNumber'] : user.mobile;
profileInfo['MobileNo'] = loggedIn != null ? loggedIn['MobileNumber'] : user!.mobile;
InsertIMEIDetailsModel insertIMEIDetailsModel = InsertIMEIDetailsModel.fromJson(profileInfo);
insertIMEIDetailsModel.genderDescription = profileInfo['Gender_Description'];
insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN'];
@ -90,12 +88,12 @@ class AuthenticationViewModel extends BaseViewModel {
insertIMEIDetailsModel.titleDescription = profileInfo['Title_Description'];
insertIMEIDetailsModel.titleDescriptionN = profileInfo['Title_DescriptionN'];
insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID);
insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user.doctorID;
insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA;
insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user!.doctorID;
insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user!.outSA;
insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
insertIMEIDetailsModel.password = userInfo.password;
insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : int.parse(user.editedBy.toString());
insertIMEIDetailsModel.loginDoctorID = loggedIn != null ? loggedIn["employeeID"] : int.parse(user!.editedBy.toString());
await _authService.insertDeviceImei(insertIMEIDetailsModel);
if (_authService.hasError) {
@ -126,17 +124,17 @@ class AuthenticationViewModel extends BaseViewModel {
Future sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async {
setState(ViewState.BusyLocal);
ActivationCodeForVerificationScreenModel activationCodeModel = ActivationCodeForVerificationScreenModel(
iMEI: user.iMEI,
facilityId: user.projectID,
memberID: user.doctorID,
loginDoctorID: int.parse(user.editedBy.toString()),
zipCode: user.outSA == true ? '971' : '966',
mobileNumber: user.mobile,
iMEI: user!.iMEI,
facilityId: user!.projectID,
memberID: user!.doctorID,
loginDoctorID: int.parse(user!.editedBy.toString()),
zipCode: user!.outSA == true ? '971' : '966',
mobileNumber: user!.mobile,
oTPSendType: authMethodType.getTypeIdService(),
isMobileFingerPrint: 1,
vidaAuthTokenID: user.vidaAuthTokenID,
vidaRefreshTokenID: user.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user.editedBy.toString());
vidaAuthTokenID: user!.vidaAuthTokenID,
vidaRefreshTokenID: user!.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user!.editedBy.toString());
await _authService.sendActivationCodeVerificationScreen(activationCodeModel);
if (_authService.hasError) {
@ -172,17 +170,17 @@ class AuthenticationViewModel extends BaseViewModel {
setState(ViewState.BusyLocal);
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel(
zipCode: loggedUser != null ? loggedUser!.zipCode : user.zipCode,
mobileNumber: loggedUser != null ? loggedUser!.mobileNumber : user.mobile,
projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user.projectID,
zipCode: loggedUser != null ? loggedUser!.zipCode : user!.zipCode,
mobileNumber: loggedUser != null ? loggedUser!.mobileNumber : user!.mobile,
projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user!.projectID,
logInTokenID: await sharedPref.getString(TOKEN),
activationCode: activationCode ?? '0000',
memberID: userInfo.userID != null ? int.parse(userInfo.userID!) : user.doctorID,
memberID: userInfo.userID != null ? int.parse(userInfo.userID!) : user!.doctorID,
password: userInfo.password,
facilityId: userInfo.projectID != null ? userInfo.projectID.toString() : user.projectID.toString(),
facilityId: userInfo.projectID != null ? userInfo.projectID.toString() : user!.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken,
loginDoctorID: loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : int.parse(user.editedBy.toString()),
loginDoctorID: loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : int.parse(user!.editedBy.toString()),
///loggedUser.listMemberInformation[0].employeeID,
// loggedUser.listMemberInformation[0].employeeID,
@ -332,8 +330,8 @@ class AuthenticationViewModel extends BaseViewModel {
if (_authService.dashboardItemsList.length > 0) {
user = _authService.dashboardItemsList[0];
sharedPref.setObj(LAST_LOGIN_USER, _authService.dashboardItemsList[0]);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID!);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user.vidaAuthTokenID!);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, user!.vidaRefreshTokenID!);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user!.vidaAuthTokenID!);
this.unverified = true;
}
setState(ViewState.Idle);

@ -108,7 +108,7 @@ class _LandingPageState extends State<LandingPage> {
}
}
class MyAppbar extends StatelessWidget {
class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
@override
final Size preferredSize;

@ -1,26 +1,22 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/viewModel/ER_sign_in/ER_sign_in_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../routes.dart';
import '../base/base_view.dart';
Utils helpers = Utils();
@ -34,14 +30,15 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
ProjectViewModel? projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return BaseView<ERSignInViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientSearchHeader(title: "ER Sign In",)
,
appBar: PatientSearchHeader(
title: "ER Sign In",
),
body: Center(
child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight! / 7),
@ -58,10 +55,7 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
SizedBox(
height: 7,
),
AppText(TranslationBase.of(context).scanERQrCode,
fontSize: 14,
fontWeight: FontWeight.w400,
textAlign: TextAlign.center),
AppText(TranslationBase.of(context).scanERQrCode, fontSize: 14, fontWeight: FontWeight.w400, textAlign: TextAlign.center),
SizedBox(
height: 15,
),
@ -95,130 +89,128 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
_scanQrAndGetPatient(BuildContext context, ERSignInViewModel model) async {
var result = (await BarcodeScanner.scan()).rawContent;
if (result != "") {
try{
try {
List<String> listOfParams = result.split(',');
int patientID = 0;
if (listOfParams[0].length != 0)
patientID = int.parse(listOfParams[0]);
showMyDialog(context:context, firstAction: (){
signInERPatient(context: context, model: model, patientId: patientID, signInType: 1);
} , secondAction: (){
signInERPatient(context: context, model: model, patientId: patientID, signInType: 2);
} );
}catch(e){
if (listOfParams[0].length != 0) patientID = int.parse(listOfParams[0]);
showMyDialog(
context: context,
firstAction: () {
signInERPatient(context: context, model: model, patientId: patientID, signInType: 1);
},
secondAction: () {
signInERPatient(context: context, model: model, patientId: patientID, signInType: 2);
});
} catch (e) {
Utils.showErrorToast("Please Enter Valid Code");
}
}
}
signInERPatient ({BuildContext? context, ERSignInViewModel? model, patientId, signInType}) async {
signInERPatient({BuildContext? context, ERSignInViewModel? model, patientId, signInType}) async {
GifLoaderDialogUtils.showMyDialog(context!);
await model!.signInERPatient(patientId:patientId, signInType: signInType );
if(model.state == ViewState.ErrorLocal) {
await model!.signInERPatient(patientId: patientId, signInType: signInType);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast("Add successfully");
}
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop();
}
/// TODO Elham* Make this as custom Dialog
showMyDialog({BuildContext? context, Function? firstAction,Function? secondAction, }) {
showMyDialog({
BuildContext? context,
Function? firstAction,
Function? secondAction,
}) {
showDialog(
context: context!,
builder: (ctx) => Center(
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
height: 250,
child: AppScaffold(
isShowAppBar: false,
body: Container(
color: Colors.white,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// SizedBox(height: 20,),
SizedBox(
height: 10,
),
Row(
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
height: 250,
child: AppScaffold(
isShowAppBar: false,
body: Container(
color: Colors.white,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
AppText(
"Select option",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
// SizedBox(height: 20,),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
"Select option",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
),
],
),
SizedBox(
height: 10,
),
DividerWithSpacesAround(),
SizedBox(
height: 12,
),
],
),
SizedBox(
height: 10,
),
DividerWithSpacesAround(),
SizedBox(
height: 12,
),
Container(
padding: EdgeInsets.all(20),
color: Colors.white,
child: AppText(
projectViewModel!.isArabic
? "الرجاء اختيار الإجراء الذي تريد القيام به"
: 'Please choose the action you want to do ',
fontSize: 15,
textAlign: TextAlign.center,
),
),
Container(
padding: EdgeInsets.all(20),
color: Colors.white,
child: AppText(
projectViewModel!.isArabic ? "الرجاء اختيار الإجراء الذي تريد القيام به" : 'Please choose the action you want to do ',
fontSize: 15,
textAlign: TextAlign.center,
),
),
SizedBox(
height: 8,
SizedBox(
height: 8,
),
DividerWithSpacesAround(),
FractionallySizedBox(
widthFactor: 0.75,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ElevatedButton(
child: AppText(
"Sing In",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
), //Text("Cancel"),
onPressed: () async {
await firstAction!();
}),
ElevatedButton(
child: AppText(
"Sing Out",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
), //Text("Confirm", ),
onPressed: () async {
await secondAction!();
})
],
),
)
],
),
DividerWithSpacesAround(),
FractionallySizedBox(
widthFactor: 0.75,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ElevatedButton(
child: AppText(
"Sing In",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
), //Text("Cancel"),
onPressed: () async {
await firstAction!();
}),
ElevatedButton(
child: AppText(
"Sing Out",
fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,
), //Text("Confirm", ),
onPressed: () async {
await secondAction!();
})
],
),
)
],
),
),
),
),
),
),
));
));
}
}

@ -42,7 +42,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
late ProjectViewModel projectsProvider;
bool isMoreOption = false;
bool onlySMSBox = false;
late AuthMethodTypes fingerPrintBefore;
AuthMethodTypes fingerPrintBefore = AuthMethodTypes.Fingerprint;
late AuthMethodTypes selectedOption;
late AuthenticationViewModel authenticationViewModel;
@ -94,7 +94,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.72,
),
AppText(
Utils.convertToTitleCase(authenticationViewModel.user.doctorName ?? ""),
Utils.convertToTitleCase(authenticationViewModel.user!.doctorName!),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 6,
color: AppGlobal.appTextColor,
fontWeight: FontWeight.bold,
@ -153,7 +153,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.4),
children: <TextSpan>[
TextSpan(
text: authenticationViewModel.getType(authenticationViewModel.user.logInTypeID, context),
text: authenticationViewModel.getType(authenticationViewModel.user!.logInTypeID, context),
style: TextStyle(
color: AppGlobal.appTextColor,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
@ -172,10 +172,10 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
AppText(
authenticationViewModel.user.editedOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn!), isMonthShort: true)
: authenticationViewModel.user.createdOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn!), isMonthShort: true)
authenticationViewModel.user!.editedOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user!.editedOn!), isMonthShort: true)
: authenticationViewModel.user!.createdOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user!.createdOn!), isMonthShort: true)
: '--',
textAlign: TextAlign.right,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
@ -184,10 +184,10 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.48,
),
AppText(
authenticationViewModel.user.editedOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn!))
: authenticationViewModel.user.createdOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn!))
authenticationViewModel.user!.editedOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user!.editedOn!))
: authenticationViewModel.user!.createdOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user!.createdOn!))
: '--',
textAlign: TextAlign.right,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
@ -250,7 +250,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
},
child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel,
authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!),
authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!),
authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
)),
),
@ -350,7 +350,6 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
sendActivationCodeByOtpNotificationType(AuthMethodTypes authMethodType) async {
if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) {
GifLoaderDialogUtils.showMyDialog(context);
await authenticationViewModel.sendActivationCodeForDoctorApp(authMethodType: authMethodType, password: authenticationViewModel.userInfo.password);
if (authenticationViewModel.state == ViewState.ErrorLocal) {
Utils.showErrorToast(authenticationViewModel.error);
@ -422,7 +421,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
new SMSOTP(
context,
type,
authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser!.mobileNumber : authenticationViewModel.user.mobile,
authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser!.mobileNumber : authenticationViewModel.user!.mobile,
(value) {
showDialog(
context: context,
@ -443,8 +442,8 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
await authenticationViewModel.showIOSAuthMessages();
if (!mounted) return;
if (authenticationViewModel.user != null &&
(SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!) == AuthMethodTypes.Fingerprint ||
SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!) == AuthMethodTypes.FaceID)) {
(SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!) == AuthMethodTypes.Fingerprint ||
SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!) == AuthMethodTypes.FaceID)) {
this.sendActivationCode(authMethodTypes);
} else {
setState(() {

@ -1,12 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/screens/ER_singin/ER_singin_screen.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/home/dashboard_slider-item-widget.dart';
@ -18,24 +18,21 @@ import 'package:doctor_app_flutter/screens/patients/In_patient/in_patient_screen
import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referral_details/patient_referral_screen.dart';
import 'package:doctor_app_flutter/screens/patients/register_patient/RegisterPatientPage.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:sticky_headers/sticky_headers/widget.dart';
import '../../widgets/shared/app_texts_widget.dart';
import 'label.dart';
class HomeScreen extends StatefulWidget {
@ -277,23 +274,41 @@ class _HomeScreenState extends State<HomeScreen> {
colorIndex = 0;
List<LinearGradient> backgroundColors = [];
backgroundColors[0] = LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [
AppGlobal.appRedColor,
Color(0xFFAD3B3B),
]); //AppGlobal.appRedColor;
backgroundColors[1] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [
Color(0xFFC9C9C9),
Color(0xFFC9C9C9),
]);
backgroundColors[2] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [Color(0xFF71787E), AppGlobal.appTextColor]);
backgroundColors.add(
LinearGradient(
begin: Alignment(-1.0, -2.0),
end: Alignment(1.0, 2.0),
colors: [
AppGlobal.appRedColor,
Color(0xFFAD3B3B),
],
),
); //AppGlobal.appRedColor;
backgroundColors.add(
LinearGradient(
begin: Alignment.center,
end: Alignment.center,
colors: [
Color(0xFFC9C9C9),
Color(0xFFC9C9C9),
],
),
);
backgroundColors.add(
LinearGradient(
begin: Alignment.center,
end: Alignment.center,
colors: [Color(0xFF71787E), AppGlobal.appTextColor],
),
);
List<Color> backgroundIconColors = [];
backgroundIconColors[0] = Colors.white12;
backgroundIconColors[1] = Colors.white38;
backgroundIconColors[2] = Colors.white10;
backgroundIconColors.add(Colors.white12);
backgroundIconColors.add(Colors.white38);
backgroundIconColors.add(Colors.white10);
List<Color> textColors = [];
textColors[0] = Colors.white;
textColors[1] = Color(0xFF353E47);
textColors[2] = Colors.white;
textColors.add(Colors.white);
textColors.add(Color(0xFF353E47));
textColors.add(Colors.white);
List<HomePatientCard> patientCards = [];

@ -1,16 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/video_channel_utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
@ -27,7 +27,7 @@ class EndCallScreen extends StatefulWidget {
const EndCallScreen({
Key? key,
this.patient,
this.patient,
}) : super(key: key);
@override
@ -233,7 +233,8 @@ class _EndCallScreenState extends State<EndCallScreen> {
isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap!,
onTap: cardsList[index].onTap,
//cardsList[index].onTap!(),
isLoading: cardsList[index].isLoading,
isDartIcon: cardsList[index].isDartIcon,
dartIcon: cardsList[index].dartIcon!,

@ -1,4 +1,5 @@
import 'dart:math';
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
@ -6,11 +7,10 @@ import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -42,8 +42,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
String _currentLocaleId = "";
final SpeechToText speech = SpeechToText();
String lastStatus = '';
GlobalKey key =
new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
String? lastError;
double level = 0.0;
@ -56,13 +55,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
super.didChangeDependencies();
}
Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize(
onError: errorListener, onStatus: statusListener);
_currentLocaleId = TranslationBase.of(context).locale.languageCode == 'en'
? 'en-GB'
: 'ar-SA'; // systemLocale.localeId;
bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
_currentLocaleId = TranslationBase.of(context).locale.languageCode == 'en' ? 'en-GB' : 'ar-SA'; // systemLocale.localeId;
if (!mounted) return;
setState(() {
@ -72,45 +67,44 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
@override
Widget build(BuildContext context) {
return BaseView<MedicineViewModel>(onModelReady: (model) async {
}, builder: (_, model, w) {
myController.text = model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(
title: TranslationBase.of(context).searchMedicine,
),
body: SingleChildScrollView(
child: Column(
return BaseView<MedicineViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) {
myController.text = model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(
title: TranslationBase.of(context).searchMedicine,
),
body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 20,
),
AppTextFieldCustomSearch(
hintText:
TranslationBase.of(context).searchMedicineNameHere,
hintText: TranslationBase.of(context).searchMedicineNameHere,
searchController: myController,
onFieldSubmitted: (value) {
searchMedicine(context, model);
},
marginTop: 5, onChangeFun: (){},
marginTop: 5,
onChangeFun: (val) {},
),
Container(
margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: AppText(
TranslationBase.of(context).youCanFind +
(myController.text != ''
? model.pharmacyItemsList.length.toString()
: '0') +
(myController.text != '' ? model.pharmacyItemsList.length.toString() : '0') +
" " +
TranslationBase.of(context).medicineSearchResult +" '${myController.text}'",
TranslationBase.of(context).medicineSearchResult +
" '${myController.text}'",
fontHeight: 1.4,
color: AppGlobal.appTextColor,
textAlign: TextAlign.start,
@ -127,33 +121,23 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
if (myController.text != '')
Container(
margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0),
height: MediaQuery.of(context).size.height * 0.6,
child: ListView.builder(
padding: const EdgeInsets.only(top: 20),
scrollDirection: Axis.vertical,
itemCount: model.pharmacyItemsList == null
? 0
: model.pharmacyItemsList.length,
itemCount: model.pharmacyItemsList == null ? 0 : model.pharmacyItemsList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model.pharmacyItemsList[index]
["ItemDescription"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"],
label: model.pharmacyItemsList[index]["ItemDescription"],
url: model.pharmacyItemsList[index]["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PharmaciesListScreen(
itemID: model.pharmacyItemsList[index]
["ItemID"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"]),
settings: RouteSettings(
name: 'PharmaciesListScreen'),
builder: (context) => PharmaciesListScreen(itemID: model.pharmacyItemsList[index]["ItemID"], url: model.pharmacyItemsList[index]["ImageSRCUrl"]),
settings: RouteSettings(name: 'PharmaciesListScreen'),
),
);
},
@ -163,45 +147,44 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
),
],
)),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
title: TranslationBase.of(context).search,
onPressed: () async {
await searchMedicine(context, model);
},
color: AppGlobal.appRedColor,
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
title: TranslationBase.of(context).search,
onPressed: () async {
await searchMedicine(context, model);
},
color: AppGlobal.appRedColor,
),
),
),
),
),
),
SizedBox(
height: 5,
SizedBox(
height: 5,
),
],
),
],
),
),
);
});
),
);
});
}
searchMedicine(context, MedicineViewModel model) async {
@ -240,8 +223,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
recognizedWord = result.recognizedWords;
lastStatus = '';
myController.text = recognizedWord!;
Future.delayed(const Duration(seconds: 2), () {
});
Future.delayed(const Duration(seconds: 2), () {});
});
}
@ -258,7 +240,6 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
});
}
void soundLevelListener(double level) {
minSoundLevel = min(minSoundLevel, level);
maxSoundLevel = max(maxSoundLevel, level);

@ -1,19 +1,13 @@
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InPatientHeader extends StatelessWidget {
InPatientHeader(
{required this.model,
required this.specialClinic,
this.activeTab,
this.selectedMapId,
this.onChangeFunc})
: super();
class InPatientHeader extends StatelessWidget implements PreferredSizeWidget {
InPatientHeader({required this.model, required this.specialClinic, this.activeTab, this.selectedMapId, this.onChangeFunc}) : super();
final PatientSearchViewModel model;
final GetSpecialClinicalCareListResponseModel specialClinic;
final activeTab;
@ -47,9 +41,7 @@ class InPatientHeader extends StatelessWidget {
letterSpacing: -1.44,
),
),
if (model.specialClinicalCareMappingList.isNotEmpty &&
specialClinic != null &&
activeTab != 2)
if (model.specialClinicalCareMappingList.isNotEmpty && specialClinic != null && activeTab != 2)
Container(
width: MediaQuery.of(context).size.width * .3,
child: DropdownButtonHideUnderline(
@ -57,8 +49,7 @@ class InPatientHeader extends StatelessWidget {
dropdownColor: Colors.white,
iconEnabledColor: Colors.black,
isExpanded: true,
value: selectedMapId ??
model.specialClinicalCareMappingList[0].nursingStationID,
value: selectedMapId ?? model.specialClinicalCareMappingList[0].nursingStationID,
iconSize: 25,
elevation: 16,
selectedItemBuilder: (BuildContext context) {
@ -83,24 +74,15 @@ class InPatientHeader extends StatelessWidget {
),
child: Center(
child: AppText(
model.specialClinicalCareMappingList.length
.toString(),
model.specialClinicalCareMappingList.length.toString(),
color: Colors.white,
fontSize:
projectsProvider.isArabic ? 10 : 11,
fontSize: projectsProvider.isArabic ? 10 : 11,
textAlign: TextAlign.center,
),
)),
],
),
AppText(
selectedMapId == null
? TranslationBase.of(context).all
: item.description!,
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.bold,
textAlign: TextAlign.end),
AppText(selectedMapId == null ? TranslationBase.of(context).all : item.description!, fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, textAlign: TextAlign.end),
],
);
}).toList();

@ -1,24 +1,25 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/tab_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../DischargedPatientPage.dart';
import 'in_patient_list_page.dart';
class InPatientScreen extends StatefulWidget {
GetSpecialClinicalCareListResponseModel specialClinic;
GetSpecialClinicalCareListResponseModel? specialClinic;
bool isAllClinic = true;
bool showBottomSheet = false;
@ -30,11 +31,10 @@ class InPatientScreen extends StatefulWidget {
_InPatientScreenState createState() => _InPatientScreenState();
}
class _InPatientScreenState extends State<InPatientScreen>
with SingleTickerProviderStateMixin {
class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProviderStateMixin {
late TabController _tabController;
int _activeTab = 0;
int selectedMapId = 0;
int selectedMapId = 0;
@override
void initState() {
@ -65,9 +65,9 @@ class _InPatientScreenState extends State<InPatientScreen>
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
model.clearPatientList();
if (widget.specialClinic != null) {
await model
.getSpecialClinicalCareMappingList(widget.specialClinic.clinicID);
if (widget.specialClinic != null && widget.specialClinic!.clinicID != null) {
print(widget.specialClinic!.toJson());
await model.getSpecialClinicalCareMappingList(widget.specialClinic!.clinicID);
// requestModel.nursingStationID =
// model.specialClinicalCareMappingList[0].nursingStationID;
}
@ -80,7 +80,7 @@ class _InPatientScreenState extends State<InPatientScreen>
appBar: InPatientHeader(
model: model,
selectedMapId: selectedMapId,
specialClinic: widget.specialClinic,
specialClinic: widget.specialClinic!,
activeTab: _activeTab,
onChangeFunc: (newValue) async {
setState(() {
@ -89,18 +89,13 @@ class _InPatientScreenState extends State<InPatientScreen>
model.clearPatientList();
GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel =
PatientSearchRequestModel(
nursingStationID: selectedMapId, clinicID: 0);
PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0);
await model.getInPatientList(requestModel, isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
onChangeState(
isAllClinic: true,
showBottomSheet: false,
selectedClinicName: null);
onChangeState(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
}
}),
body: Column(
@ -110,15 +105,12 @@ class _InPatientScreenState extends State<InPatientScreen>
child: Scaffold(
extendBodyBehindAppBar: false,
appBar: PreferredSize(
preferredSize: Size.fromHeight(
MediaQuery.of(context).size.height * 0.070),
preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.5), //width: 0.7
bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.5), //width: 0.7
),
color: Colors.white),
child: Container(
@ -132,15 +124,10 @@ class _InPatientScreenState extends State<InPatientScreen>
indicator: BoxDecoration(),
// indicatorSize: TabBarIndicatorSize.tab,
// labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(
top: 0, left: 0, right: 0, bottom: 0),
labelPadding: EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
// unselectedLabelColor: Colors.grey[800],
tabs: [
tabWidget(screenSize, _activeTab == 0,
TranslationBase.of(context).inPatientAll,
context: context,
counter: model.inPatientList.length,
isFirst: true),
tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll, context: context, counter: model.inPatientList.length, isFirst: true),
tabWidget(
screenSize,
_activeTab == 1,
@ -204,30 +191,16 @@ class _InPatientScreenState extends State<InPatientScreen>
});
}
Widget tabWidget(Size screenSize, bool isActive, String title,
{int counter = -1,
bool isFirst = false,
bool isMiddle = false,
bool isLast = false,
BuildContext? context}) {
Widget tabWidget(Size screenSize, bool isActive, String title, {int counter = -1, bool isFirst = false, bool isMiddle = false, bool isLast = false, BuildContext? context}) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context!);
return Center(
child: Container(
height: TabUtils.getTabHeight(context!),
decoration: TabUtils.getBoxTabsBoxDecoration(
isActive: isActive,
isFirst: isFirst,
isMiddle: isMiddle,
isLast: isLast,
projectViewModel: projectsProvider),
decoration: TabUtils.getBoxTabsBoxDecoration(isActive: isActive, isFirst: isFirst, isMiddle: isMiddle, isLast: isLast, projectViewModel: projectsProvider),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TabUtils.getTabText(title: title, isActive: isActive),
if (counter != -1)
TabUtils.getTabCounter(isActive: isActive, counter: counter)
],
children: [TabUtils.getTabText(title: title, isActive: isActive), if (counter != -1) TabUtils.getTabCounter(isActive: isActive, counter: counter)],
),
),
);

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import '../../../routes.dart';
import 'NoData.dart';
@ -27,54 +28,45 @@ class ListOfAllInPatient extends StatelessWidget {
? NoData()
: NotificationListener(
child: ListView.builder(
itemCount:
patientSearchViewModel.filteredInPatientItems.length,
itemCount: patientSearchViewModel.filteredInPatientItems.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) {
return PatientCard(
patientInfo: patientSearchViewModel
.filteredInPatientItems[index],
patientInfo: patientSearchViewModel.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: patientSearchViewModel
.filteredInPatientItems[index].doctorId ==
patientSearchViewModel.doctorProfile!.doctorID,
isMyPatient: patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID,
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patientSearchViewModel
.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient": patientSearchViewModel
.filteredInPatientItems[index].doctorId ==
patientSearchViewModel.doctorProfile!.doctorID,
SchedulerBinding.instance.addPostFrameCallback((_) {
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patientSearchViewModel.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient": patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID,
});
});
},
);
}),
onNotification: (notification) {
if (isAllClinic && !hasQuery) if (notification
is ScrollUpdateNotification) {
if (notification.metrics.pixels >=
notification.metrics.maxScrollExtent - 50) {
if (isAllClinic && !hasQuery) if (notification is ScrollUpdateNotification) {
if (notification.metrics.pixels >= notification.metrics.maxScrollExtent - 50) {
patientSearchViewModel.addOnFilteredList();
}
if (notification.metrics.pixels <=
notification.metrics.minScrollExtent - 50) {
if (notification.metrics.pixels <= notification.metrics.minScrollExtent - 50) {
patientSearchViewModel.removeOnFilteredList();
}
}

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class PatientSearchHeader extends StatelessWidget {
class PatientSearchHeader extends StatelessWidget implements PreferredSizeWidget {
final String? title;
const PatientSearchHeader({Key? key, this.title}) : super(key: key);

@ -8,7 +8,7 @@ class PatientProfileCardModel {
final bool isInPatient;
final bool isDisable;
final bool isLoading;
final Function? onTap;
final Function()? onTap;
final bool isDischargedPatient;
final bool isSelectInpatient;
final bool isDartIcon;

@ -25,27 +25,97 @@ class ProfileGridForInPatient extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result, RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/Radiology.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).progress, TranslationBase.of(context).note, PROGRESS_NOTE, 'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).order, TranslationBase.of(context).sheet, ORDER_NOTE, 'assets/images/svgs/profile_screen/order sheets.svg',
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).medical, TranslationBase.of(context).report, PATIENT_MEDICAL_REPORT, 'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient, isDisable: false),
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).result,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/Radiology.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).progress,
TranslationBase.of(context).note,
PROGRESS_NOTE,
'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).order,
TranslationBase.of(context).sheet,
ORDER_NOTE,
'assets/images/svgs/profile_screen/order sheets.svg',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).medical,
TranslationBase.of(context).report,
PATIENT_MEDICAL_REPORT,
'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient,
isDisable: false,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
@ -53,15 +123,23 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).approvals, PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).discharge,
TranslationBase.of(context).report,
DISCHARGE_SUMMARY,
'assets/images/svgs/profile_screen/discharge summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
@ -69,6 +147,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).operation,
@ -76,6 +155,7 @@ class ProfileGridForInPatient extends StatelessWidget {
GET_OPERATION_REPORT,
'assets/images/svgs/profile_screen/operating report.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).pending,
@ -83,6 +163,7 @@ class ProfileGridForInPatient extends StatelessWidget {
PENDING_ORDERS,
'assets/images/svgs/profile_screen/pending orders.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).admission,
@ -90,6 +171,7 @@ class ProfileGridForInPatient extends StatelessWidget {
ADMISSION_ORDERS,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
"Nursing",
@ -97,6 +179,7 @@ class ProfileGridForInPatient extends StatelessWidget {
NURSING_PROGRESS_NOTE,
'assets/images/svgs/profile_screen/Progress notes.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).diagnosis,
@ -104,6 +187,7 @@ class ProfileGridForInPatient extends StatelessWidget {
DIAGNOSIS_FOR_IN_PATIENT,
'assets/images/svgs/profile_screen/diagnosis.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).diabetic,
@ -111,6 +195,7 @@ class ProfileGridForInPatient extends StatelessWidget {
DIABETIC_CHART_VALUES,
'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
"VTE",
@ -118,6 +203,7 @@ class ProfileGridForInPatient extends StatelessWidget {
VTE_ASSESSMENT,
'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).pharmacy,
@ -125,6 +211,7 @@ class ProfileGridForInPatient extends StatelessWidget {
PHARMACY_INTERVENTION,
'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient,
//onTap: () {},
),
];
@ -155,7 +242,9 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable,
onTap: item.onTap!,
onTap: () {
//item.onTap();
},
isLoading: item.isLoading,
);
}).toList(),

@ -16,34 +16,109 @@ class ProfileGridForOther extends StatelessWidget {
String? from;
String? to;
ProfileGridForOther({Key? key, this.patient, this.patientType, this.arrivalType, this.height , this.isInpatient = false, this.from, this.to, this.isFromLiveCare = false}) : super(key: key);
ProfileGridForOther({Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to, this.isFromLiveCare = false}) : super(key: key);
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, 'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'assets/images/svgs/profile_screen/ECG.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient,
//onTap: () {},
),
if (isFromLiveCare || (patient!.appointmentNo != null && patient!.appointmentNo != 0))
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient, isDisable: isFromLiveCare ? patient!.appointmentNo == null : patient!.patientStatusType != 43 || patient!.appointmentNo == null),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient,
isDisable: isFromLiveCare ? patient!.appointmentNo == null : patient!.patientStatusType != 43 || patient!.appointmentNo == null,
//onTap: () {},
),
if (isFromLiveCare || (patient!.appointmentNo != null && patient!.appointmentNo != 0))
PatientProfileCardModel(
TranslationBase.of(context).referral,
@ -52,10 +127,18 @@ class ProfileGridForOther extends StatelessWidget {
'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient,
isDisable: isFromLiveCare ? patient!.appointmentNo == null : patient!.patientStatusType != 43 || patient!.appointmentNo == null,
//onTap: () {},
),
if (isFromLiveCare || (patient!.appointmentNo != null && patient!.appointmentNo != 0))
PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient, isDisable: isFromLiveCare ? patient!.appointmentNo == null : patient!.patientStatusType != 43 || patient!.appointmentNo == null),
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient,
isDisable: isFromLiveCare ? patient!.appointmentNo == null : patient!.patientStatusType != 43 || patient!.appointmentNo == null,
//onTap: () {},
),
];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
@ -84,7 +167,8 @@ class ProfileGridForOther extends StatelessWidget {
isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable,
onTap: item.onTap!,
onTap: () {},
//item.onTap!(),
isLoading: item.isLoading,
);
}).toList(),

@ -15,107 +15,129 @@ class ProfileGridForSearch extends StatelessWidget {
String? from;
String? to;
ProfileGridForSearch(
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient = false,
this.from,
this.to})
: super(key: key);
ProfileGridForSearch({Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to}) : super(key: key);
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient),
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG",
PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg',
isInPatient: isInpatient),
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'assets/images/svgs/profile_screen/ECG.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient),
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient),
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient),
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false),
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false),
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false),
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
];
return Padding(
@ -145,7 +167,8 @@ class ProfileGridForSearch extends StatelessWidget {
isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable,
onTap: item.onTap!,
onTap: () {},
//item.onTap(),
isLoading: item.isLoading,
);
}).toList(),

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart';
class BottomSheetTitle extends StatelessWidget {
class BottomSheetTitle extends StatelessWidget implements PreferredSizeWidget {
BottomSheetTitle({
Key? key,
this.title = '',
@ -33,14 +33,7 @@ class BottomSheetTitle extends StatelessWidget {
text: TextSpan(
style: TextStyle(fontSize: 20, color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: title,
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
letterSpacing: -1.44,
fontSize: 24.0)),
new TextSpan(text: title, style: TextStyle(color: Color(0xFF2B353E), fontWeight: FontWeight.w700, fontFamily: 'Poppins', letterSpacing: -1.44, fontSize: 24.0)),
],
),
),
@ -48,9 +41,7 @@ class BottomSheetTitle extends StatelessWidget {
onTap: () {
Navigator.pop(context);
},
child: Icon(DoctorApp.close_1,
size: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
color: Color(0xFF2B353E)))
child: Icon(DoctorApp.close_1, size: SizeConfig.getTextMultiplierBasedOnWidth() * 5, color: Color(0xFF2B353E)))
],
),
],

@ -49,13 +49,8 @@ class SMSOTP {
displayDialog(BuildContext context) async {
double dialogWidth = MediaQuery.of(context).size.width * 0.90;
double dialogInputWidth = (dialogWidth / 4) -
(SizeConfig.isWidthLarge
? SizeConfig.getWidthMultiplier(width: dialogWidth) * 4.5
: 20);
double dialogHeight = SizeConfig.isHeightVeryShort
? MediaQuery.of(context).size.height * 0.50
: MediaQuery.of(context).size.height * 0.40;
double dialogInputWidth = (dialogWidth / 4) - (SizeConfig.isWidthLarge ? SizeConfig.getWidthMultiplier(width: dialogWidth) * 4.5 : 20);
double dialogHeight = SizeConfig.isHeightVeryShort ? MediaQuery.of(context).size.height * 0.50 : MediaQuery.of(context).size.height * 0.40;
return showDialog(
context: context,
builder: (ctx) => Center(
@ -81,259 +76,182 @@ class SMSOTP {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: SizeConfig.getHeightMultiplier(
height: dialogHeight) *
2,
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 2,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Icon(
type == AuthMethodTypes.SMS
? DoctorApp.verify_sms_1
: DoctorApp.verify_whtsapp,
size: SizeConfig.getHeightMultiplier(
height: dialogHeight) *
9,
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Icon(
type == AuthMethodTypes.SMS ? DoctorApp.verify_sms_1 : DoctorApp.verify_whtsapp,
size: SizeConfig.getHeightMultiplier(height: dialogHeight) * 9,
color: Color(0xFF2B353E),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
IconButton(
icon: Icon(Icons.close),
color: Color(0xFF2B353E),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
IconButton(
icon: Icon(Icons.close),
color: Color(0xFF2B353E),
iconSize:
SizeConfig.getHeightMultiplier(
height: dialogHeight) *
15,
onPressed: () {
this.isClosed = true;
Navigator.pop(context);
this.onFailure();
},
)
],
iconSize: SizeConfig.getHeightMultiplier(height: dialogHeight) * 15,
onPressed: () {
this.isClosed = true;
Navigator.pop(context);
this.onFailure();
},
)
]),
],
)
]),
SizedBox(
height: SizeConfig.getHeightMultiplier(
height: dialogHeight) *
(SizeConfig.isHeightVeryShort ? 10 : 5),
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * (SizeConfig.isHeightVeryShort ? 10 : 5),
),
Padding(
padding: EdgeInsets.only(top: 5, right: 5),
child: AppText(
TranslationBase.of(context)
.verificationMessage +
' XXXXXX' +
mobileNo.toString().substring(
mobileNo.toString().length - 3),
TranslationBase.of(context).verificationMessage + ' XXXXXX' + mobileNo.toString().substring(mobileNo.toString().length - 3),
textAlign: TextAlign.start,
fontWeight: FontWeight.w700,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth(
width: dialogWidth) *
3.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
//14,
maxLines: 2,
)),
Form(
key: verifyAccountForm,
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.getHeightMultiplier(
height: dialogHeight) *
2),
padding: EdgeInsets.only(top: SizeConfig.getHeightMultiplier(height: dialogHeight) * 2),
child: Directionality(
textDirection: TextDirection.ltr,
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: dialogInputWidth,
height:
SizeConfig.getHeightMultiplier(
height: dialogHeight) *
30,
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
child: TextFormField(
textInputAction:
TextInputAction.next,
style: buildTextStyle(),
autofocus: true,
maxLength: 1,
controller: digit1,
textAlign: TextAlign.center,
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(context),
onSaved: (val) {},
validator: validateCodeDigit,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD2);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD2);
verifyAccountFormValue[
'digit1'] = val.trim();
checkValue();
}
},
),
textInputAction: TextInputAction.next,
style: buildTextStyle(),
autofocus: true,
maxLength: 1,
controller: digit1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
// validator: validateCodeDigit,
onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusD2);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context).requestFocus(focusD2);
verifyAccountFormValue['digit1'] = val.trim();
checkValue();
}
},
validator: validateCodeDigit),
),
Container(
width: dialogInputWidth,
height:
SizeConfig.getHeightMultiplier(
height: dialogHeight) *
30,
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
child: TextFormField(
focusNode: focusD2,
textInputAction:
TextInputAction.next,
textInputAction: TextInputAction.next,
maxLength: 1,
controller: digit2,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD3);
FocusScope.of(context).requestFocus(focusD3);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD3);
verifyAccountFormValue[
'digit2'] = val.trim();
FocusScope.of(context).requestFocus(focusD3);
verifyAccountFormValue['digit2'] = val.trim();
checkValue();
}
},
validator: validateCodeDigit),
validator: validateCodeDigit
// validator: validateCodeDigit
),
),
Container(
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
width: dialogInputWidth,
height: SizeConfig
.getHeightMultiplier(
height:
dialogHeight) *
30,
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
child: TextFormField(
focusNode: focusD3,
textInputAction:
TextInputAction.next,
textInputAction: TextInputAction.next,
maxLength: 1,
controller: digit3,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD4);
FocusScope.of(context).requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(
focusD4);
verifyAccountFormValue[
'digit3'] =
val.trim();
FocusScope.of(context).requestFocus(focusD4);
verifyAccountFormValue['digit3'] = val.trim();
checkValue();
}
},
validator:
validateCodeDigit)),
validator: validateCodeDigit
// validator: validateCodeDigit
)),
Container(
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
width: dialogInputWidth,
height: SizeConfig
.getHeightMultiplier(
height:
dialogHeight) *
30,
child: TextFormField(
focusNode: focusD4,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
controller: digit4,
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
verifyAccountFormValue[
'digit4'] =
val.trim();
checkValue();
}
},
validator:
validateCodeDigit)),
margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
width: dialogInputWidth,
height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
child: TextFormField(
focusNode: focusD4,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
controller: digit4,
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
verifyAccountFormValue['digit4'] = val.trim();
checkValue();
}
},
validator: validateCodeDigit),
),
],
)),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.validationMessage +
' ',
textAlign: TextAlign.start,
fontWeight: FontWeight.w700,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth(
width: dialogWidth) *
3.5,
),
AppText(
displayTime,
color: Colors.red,
textAlign: TextAlign.start,
fontWeight: FontWeight.bold,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth(
width: dialogWidth) *
3.5,
)
])
Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
AppText(
TranslationBase.of(context).validationMessage + ' ',
textAlign: TextAlign.start,
fontWeight: FontWeight.w700,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
),
AppText(
displayTime,
color: Colors.red,
textAlign: TextAlign.start,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
)
])
],
),
),
@ -370,43 +288,38 @@ class SMSOTP {
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
borderSide: BorderSide(color: Theme.of(context).colorScheme.error),
),
);
}
// ignore: missing_return
String validateCodeDigit(value) {
String? validateCodeDigit(value) {
if (value.isEmpty) {
return ' ';
return '';
} else if (value.length == 3) {
print(value);
}
return "";
return null;
}
checkValue() async {
if (verifyAccountForm.currentState!.validate()) {
onSuccess(digit1.text.toString() +
digit2.text.toString() +
digit3.text.toString() +
digit4.text.toString());
// if (digit1.text.isNotEmpty && digit2.text.isNotEmpty && digit3.text.isNotEmpty && digit4.text.isNotEmpty) {
onSuccess(digit1.text.toString() + digit2.text.toString() + digit3.text.toString() + digit4.text.toString());
this.isClosed = true;
}
}
getSecondsAsDigitalClock(int inputSeconds) {
var sec_num =
int.parse(inputSeconds.toString()); // don't forget the second param
var sec_num = int.parse(inputSeconds.toString()); // don't forget the second param
var hours = (sec_num / 3600).floor();
var minutes = ((sec_num - hours * 3600) / 60).floor();
var seconds = sec_num - hours * 3600 - minutes * 60;
var minutesString = "";
var secondsString = "";
minutesString =
minutes < 10 ? "0" + minutes.toString() : minutes.toString();
secondsString =
seconds < 10 ? "0" + seconds.toString() : seconds.toString();
minutesString = minutes < 10 ? "0" + minutes.toString() : minutes.toString();
secondsString = seconds < 10 ? "0" + seconds.toString() : seconds.toString();
return minutesString + ":" + secondsString;
}

@ -1,8 +1,8 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:charts_flutter/flutter.dart';
import 'package:flutter/material.dart';
class GaugeChart extends StatelessWidget {
final List<charts.Series> seriesList;
final List<Series<dynamic, String>> seriesList;
final bool animate;
GaugeChart(this.seriesList, {this.animate = false});
@ -18,24 +18,23 @@ class GaugeChart extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new charts.PieChart(seriesList,
animate: animate,
defaultRenderer: new charts.ArcRendererConfig(arcWidth: 10));
return PieChart<String>(
seriesList, animate: animate, defaultRenderer: ArcRendererConfig(arcRendererDecorators: [ArcLabelDecorator(labelPosition: ArcLabelPosition.auto)]),
//ArcRendererConfig(arcWidth: 10),
);
//);
}
static List<charts.Series<GaugeSegment, String>> _createSampleData() {
static List<Series<GaugeSegment, String>> _createSampleData() {
final data = [
new GaugeSegment('Low', 75, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment(
'Acceptable', 100, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment('High', 50, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment(
'Highly Unusual', 55, charts.MaterialPalette.blue.shadeDefault),
GaugeSegment('Low', 75, MaterialPalette.blue.shadeDefault),
GaugeSegment('Acceptable', 100, MaterialPalette.blue.shadeDefault),
GaugeSegment('High', 50, MaterialPalette.blue.shadeDefault),
GaugeSegment('Highly Unusual', 55, MaterialPalette.blue.shadeDefault),
];
return [
new charts.Series<GaugeSegment, String>(
Series<GaugeSegment, String>(
id: 'Segments',
domainFn: (GaugeSegment segment, _) => segment.segment,
measureFn: (GaugeSegment segment, _) => segment.size,

@ -1,24 +1,24 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'ShowTimer.dart';
class PatientCard extends StatelessWidget {
final PatiantInformtion? patientInfo;
final Function? onTap;
final Function()? onTap;
final String patientType;
final String arrivalType;
final bool isInpatient;
@ -29,7 +29,7 @@ class PatientCard extends StatelessWidget {
PatientCard(
{Key? key,
this.patientInfo,
this.onTap,
required this.onTap,
this.patientType = '',
this.arrivalType = '',
this.isInpatient = false,
@ -52,11 +52,7 @@ class PatientCard extends StatelessWidget {
return Container(
width: SizeConfig.screenWidth! * 0.9,
margin: EdgeInsets.all(6),
padding: EdgeInsets.only(
left: projectViewModel.isArabic ? 5 : 0,
right: projectViewModel.isArabic ? 0 : 5,
bottom: 0,
top: 0),
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 5 : 0, right: projectViewModel.isArabic ? 0 : 5, bottom: 0, top: 0),
decoration: Utils.getCardBoxDecoration(),
child: CardWithBgWidget(
padding: 0,
@ -99,8 +95,7 @@ class PatientCard extends StatelessWidget {
? Row(
children: [
PatientStatus(
label: TranslationBase.of(context)
.arrivedP,
label: TranslationBase.of(context).arrivedP,
color: AppGlobal.appGreenColor,
),
SizedBox(
@ -117,12 +112,8 @@ class PatientCard extends StatelessWidget {
width: 8,
),
PatientStatus(
label: patientInfo!.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo!.status == 2
? AppGlobal.appGreenColor
: Colors.grey,
label: patientInfo!.status == 2 ? 'Confirmed' : 'Booked',
color: patientInfo!.status == 2 ? AppGlobal.appGreenColor : Colors.grey,
),
],
)
@ -130,9 +121,7 @@ class PatientCard extends StatelessWidget {
? Row(
children: [
PatientStatus(
label:
TranslationBase.of(context)
.notArrived,
label: TranslationBase.of(context).notArrived,
color: Colors.red[800]!,
),
SizedBox(
@ -149,26 +138,16 @@ class PatientCard extends StatelessWidget {
width: 8,
),
PatientStatus(
label: patientInfo!.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo!.status == 2
? AppGlobal.appGreenColor
: Colors.grey,
label: patientInfo!.status == 2 ? 'Confirmed' : 'Booked',
color: patientInfo!.status == 2 ? AppGlobal.appGreenColor : Colors.grey,
)
],
)
: !isFromSearch &&
!isFromLiveCare &&
patientInfo!
.patientStatusType ==
null
: !isFromSearch && !isFromLiveCare && patientInfo!.patientStatusType == null
? Row(
children: [
PatientStatus(
label: TranslationBase.of(
context)
.notArrived,
label: TranslationBase.of(context).notArrived,
color: Colors.red[800],
),
SizedBox(
@ -185,24 +164,15 @@ class PatientCard extends StatelessWidget {
width: 8,
),
PatientStatus(
label:
patientInfo!.status == 2
? 'Booked'
: 'Confirmed',
color:
patientInfo!.status == 2
? Colors.grey
: AppGlobal
.appGreenColor,
label: patientInfo!.status == 2 ? 'Booked' : 'Confirmed',
color: patientInfo!.status == 2 ? Colors.grey : AppGlobal.appGreenColor,
)
],
)
: SizedBox(),
this.arrivalType == '1'
? AppText(
patientInfo!.startTime != null
? patientInfo!.startTime!
: patientInfo!.startTimes!,
patientInfo!.startTime != null ? patientInfo!.startTime! : patientInfo!.startTimes!,
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
)
@ -217,13 +187,9 @@ class PatientCard extends StatelessWidget {
letterSpacing: -0.64,
),
)
: (patientInfo!.appointmentDate !=
null &&
patientInfo!.appointmentDate!
.isNotEmpty)
: (patientInfo!.appointmentDate != null && patientInfo!.appointmentDate!.isNotEmpty)
? Container(
padding:
EdgeInsets.only(right: 9),
padding: EdgeInsets.only(right: 9),
child: AppText(
" ${AppDateUtils.getStartTime(patientInfo!.startTime!)}",
fontFamily: 'Poppins',
@ -255,45 +221,31 @@ class PatientCard extends StatelessWidget {
children: [
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
AppText(
isFromLiveCare
? Utils.capitalize(
patientInfo!.fullName)
: (Utils.capitalize(
patientInfo!.firstName) +
" " +
Utils.capitalize(
patientInfo!.lastName)),
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
letterSpacing: -0.64,
textOverflow: TextOverflow.ellipsis,
),
if (patientInfo!.gender == 1)
Container(
padding: EdgeInsets.symmetric(
horizontal: 4, vertical: 2),
child: SvgPicture.asset(
"assets/images/svgs/male.svg"),
)
else
Container(
padding: EdgeInsets.symmetric(
horizontal: 4, vertical: 2),
child: SvgPicture.asset(
"assets/images/svgs/female.svg"),
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo!,
),
]),
child: Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [
AppText(
isFromLiveCare ? Utils.capitalize(patientInfo!.fullName) : (Utils.capitalize(patientInfo!.firstName) + " " + Utils.capitalize(patientInfo!.lastName)),
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
letterSpacing: -0.64,
textOverflow: TextOverflow.ellipsis,
),
if (patientInfo!.gender == 1)
Container(
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
child: SvgPicture.asset("assets/images/svgs/male.svg"),
)
else
Container(
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
child: SvgPicture.asset("assets/images/svgs/female.svg"),
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo!,
),
]),
),
if (nationalityName.isNotEmpty)
Expanded(
@ -314,26 +266,16 @@ class PatientCard extends StatelessWidget {
),
),
),
patientInfo!.nationality != null ||
patientInfo!.nationalityId != null
patientInfo!.nationality != null || patientInfo!.nationalityId != null
? Container(
padding: EdgeInsets.only(
right: 7, top: 5),
padding: EdgeInsets.only(right: 7, top: 5),
child: ClipRRect(
borderRadius:
BorderRadius.circular(20.0),
borderRadius: BorderRadius.circular(20.0),
child: CachedNetworkImage(
imageUrl: patientInfo!
.nationalityFlagURL !=
null
? patientInfo!
.nationalityFlagURL!
: '',
imageUrl: patientInfo!.nationalityFlagURL != null ? patientInfo!.nationalityFlagURL! : '',
height: 16,
width: 22,
errorWidget:
(context, url, error) =>
AppText(
errorWidget: (context, url, error) => AppText(
'No Image',
fontSize: 10,
),
@ -348,177 +290,132 @@ class PatientCard extends StatelessWidget {
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 12.0, top: 5),
child: Container(
width: 60,
height: 60,
//TODO Elham* create widget for this to make it use every where
child: SvgPicture.asset(
patientInfo!.gender == 1
? 'assets/images/svgs/male avatar.svg'
: 'assets/images/svgs/female avatar.svg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 10,
Row(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 12.0, top: 5),
child: Container(
width: 60,
height: 60,
//TODO Elham* create widget for this to make it use every where
child: SvgPicture.asset(
patientInfo!.gender == 1 ? 'assets/images/svgs/male avatar.svg' : 'assets/images/svgs/female avatar.svg',
fit: BoxFit.cover,
),
),
),
SizedBox(
width: 10,
),
Expanded(
child: Row(
children: [
Expanded(
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
// SizedBox(height: 10,),
CustomRow(
label: TranslationBase.of(context)
.fileNumber,
value:
patientInfo!.patientId.toString(),
),
CustomRow(
label: TranslationBase.of(context).age +
" : ",
value:
"${AppDateUtils.getAgeByBirthday(patientInfo!.dateofBirth!, context, isServerFormat: !isFromLiveCare)}",
),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [
// SizedBox(height: 10,),
CustomRow(
label: TranslationBase.of(context).fileNumber,
value: patientInfo!.patientId.toString(),
),
CustomRow(
label: TranslationBase.of(context).age + " : ",
value: "${AppDateUtils.getAgeByBirthday(patientInfo!.dateofBirth!, context, isServerFormat: !isFromLiveCare)}",
),
patientInfo!.arrivedOn != null
? Column(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// AppDateUtils
// .getDayMonthYearDateFormatted(
// AppDateUtils
// .convertStringToDate(
// patientInfo!.arrivedOn,
// ),
// isMonthShort: true,
// ),
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w600,
// fontSize: 11,
// letterSpacing: -0.64,
// ),
patientInfo!.arrivedOn != null
? Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.start,
children: [
// AppText(
// AppDateUtils
// .getDayMonthYearDateFormatted(
// AppDateUtils
// .convertStringToDate(
// patientInfo!.arrivedOn,
// ),
// isMonthShort: true,
// ),
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w600,
// fontSize: 11,
// letterSpacing: -0.64,
// ),
CustomRow(
label: TranslationBase.of(
context)
.arrivedP +
" : ",
value: AppDateUtils
.getDayMonthYearDateFormatted(
AppDateUtils
.convertStringToDate(
patientInfo!.arrivedOn!,
),
isMonthShort: true,
),
),
],
)
: (patientInfo!.appointmentDate !=
null &&
patientInfo!.appointmentDate!
.isNotEmpty)
? Column(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(
context)
.appointmentDate +
" : ",
value: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(
patientInfo!
.appointmentDate!,
), isMonthShort: true)}",
),
],
)
: SizedBox(),
if (isInpatient)
CustomRow(
label:
patientInfo!.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo!.admissionDate ==
null
? ""
: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(patientInfo!.admissionDate.toString()), isMonthShort: true)}",
),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context)
.numOfDays +
" : ",
value:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo!.admissionDate!)).inDays + 1}",
),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context)
.clinicName +
" : ",
value:
"${patientInfo!.clinicDescription}",
),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context)
.roomNo +
" : ",
value: "${patientInfo!.roomId}",
label: TranslationBase.of(context).arrivedP + " : ",
value: AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
patientInfo!.arrivedOn!,
),
isMonthShort: true,
),
),
if (isFromLiveCare)
Column(
],
)
: (patientInfo!.appointmentDate != null && patientInfo!.appointmentDate!.isNotEmpty)
? Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context)
.clinic +
" : ",
value: patientInfo!.clinicName!,
label: TranslationBase.of(context).appointmentDate + " : ",
value: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(
patientInfo!.appointmentDate!,
), isMonthShort: true)}",
),
],
),
]),
),
Padding(
padding: const EdgeInsets.only(right: 8),
child: Icon(
Icons.arrow_forward,
size: 24,
)
: SizedBox(),
if (isInpatient)
CustomRow(
label: patientInfo!.admissionDate == null ? "" : TranslationBase.of(context).admissionDate + " : ",
value: patientInfo!.admissionDate == null
? ""
: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(patientInfo!.admissionDate.toString()), isMonthShort: true)}",
),
),
],
))
]),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context).numOfDays + " : ",
value: "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo!.admissionDate!)).inDays + 1}",
),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context).clinicName + " : ",
value: "${patientInfo!.clinicDescription}",
),
if (patientInfo!.admissionDate != null)
CustomRow(
label: TranslationBase.of(context).roomNo + " : ",
value: "${patientInfo!.roomId}",
),
if (isFromLiveCare)
Column(
children: [
CustomRow(
label: TranslationBase.of(context).clinic + " : ",
value: patientInfo!.clinicName!,
),
],
),
]),
),
Padding(
padding: const EdgeInsets.only(right: 8),
child: Icon(
Icons.arrow_forward,
size: 24,
),
),
],
))
]),
isFromLiveCare
? Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.only(
left: 9, right: 9, bottom: 9),
padding: EdgeInsets.only(left: 9, right: 9, bottom: 9),
child: SvgPicture.asset(
'assets/images/svgs/profile_screen/livecare.svg',
height: 20,
@ -528,42 +425,29 @@ class PatientCard extends StatelessWidget {
],
)
: !isInpatient && !isFromSearch
? Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
? Row(mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
padding: EdgeInsets.only(left: 9, right: 9, bottom: 9),
child: SvgPicture.asset(
patientInfo!.appointmentType == 'Regular' && patientInfo!.visitTypeId == 100
? 'assets/images/svgs/profile_screen/livecare.svg'
: patientInfo!.appointmentType == 'Walkin'
? 'assets/images/svgs/profile_screen/walkin.svg'
: 'assets/images/svgs/profile_screen/booked.svg',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
padding: EdgeInsets.only(
left: 9, right: 9, bottom: 9),
padding: EdgeInsets.only(left: 9, right: 9, bottom: 9),
child: SvgPicture.asset(
patientInfo!.appointmentType ==
'Regular' &&
patientInfo!.visitTypeId ==
100
? 'assets/images/svgs/profile_screen/livecare.svg'
: patientInfo!.appointmentType ==
'Walkin'
? 'assets/images/svgs/profile_screen/walkin.svg'
: 'assets/images/svgs/profile_screen/booked.svg',
'assets/images/svgs/inpatient.svg',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(
left: 9, right: 9, bottom: 9),
child: SvgPicture.asset(
'assets/images/svgs/inpatient.svg',
height: 25,
width: 35,
)),
])
: SizedBox()
],
),

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
@ -24,7 +24,7 @@ class PatientProfileButton extends StatelessWidget {
final String url = "assets/images/";
final bool isDisable;
final bool isLoading;
final Function? onTap;
final Function()? onTap;
final bool isDischargedPatient;
final bool isSelectInpatient;
final bool isDartIcon;
@ -42,7 +42,7 @@ class PatientProfileButton extends StatelessWidget {
this.icon,
this.route,
this.isDisable = false,
this.onTap,
required this.onTap,
this.isLoading = false,
this.from,
this.to,
@ -65,63 +65,59 @@ class PatientProfileButton extends StatelessWidget {
child: InkWell(
onTap: isDisable
? null
: onTap!() != null
: onTap != null
? onTap!()
: () {
navigator(context, this.route);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
padding: EdgeInsets.fromLTRB(8, 0, 8, 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: isDartIcon
? Icon(
dartIcon,
size: 30,
color: color ?? Color(0xFF333C45),
)
: new SvgPicture.asset(
icon!,
width: 30,
height: 30,
),
)
],
)),
Container(
alignment: projectsProvider.isArabic
? Alignment.topRight
: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
!projectsProvider.isArabic ? this.nameLine1! : nameLine2!,
color: color ?? AppGlobal.appTextColor,
letterSpacing: -0.33,
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier! * 1.30,
),
AppText(
!projectsProvider.isArabic ? this.nameLine2! : nameLine1!,
color: color ?? Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontHeight: 1.4,
fontSize: SizeConfig.textMultiplier! * 1.30,
),
if (isLoading) DrAppCircularProgressIndeicator()
],
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Container(
padding: EdgeInsets.fromLTRB(8, 0, 8, 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: isDartIcon
? Icon(
dartIcon,
size: 30,
color: color ?? Color(0xFF333C45),
)
: new SvgPicture.asset(
icon!,
width: 30,
height: 30,
),
)
],
)),
Container(
alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
!projectsProvider.isArabic ? this.nameLine1! : nameLine2!,
color: color ?? AppGlobal.appTextColor,
letterSpacing: -0.33,
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier! * 1.30,
),
AppText(
!projectsProvider.isArabic ? this.nameLine2! : nameLine1!,
color: color ?? Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontHeight: 1.4,
fontSize: SizeConfig.textMultiplier! * 1.30,
),
),
]),
if (isLoading) DrAppCircularProgressIndeicator()
],
),
),
]),
),
decoration: BoxDecoration(
// border: Border.all(),

@ -1,11 +1,11 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -14,7 +14,7 @@ import 'package:url_launcher/url_launcher.dart';
import '../large_avatar.dart';
import 'header_row.dart';
class PatientProfileAppBar extends StatelessWidget {
class PatientProfileAppBar extends StatelessWidget implements PreferredSizeWidget {
final PatiantInformtion patient;
final double height;
final bool isInpatient;
@ -54,7 +54,7 @@ class PatientProfileAppBar extends StatelessWidget {
this.visitDate = '',
this.isAppointmentHeader = false,
this.isFromLabResult = false,
this.onPressed});
this.onPressed});
@override
Widget build(BuildContext context) {
@ -73,17 +73,14 @@ class PatientProfileAppBar extends StatelessWidget {
right: 5,
bottom: 5,
),
decoration: BoxDecoration(
color: Colors.white,
border: Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: SizeConfig.isHeightVeryShort ? 30 : 50),
child: Column(
children: [
Container(
padding: EdgeInsets.only(
left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
@ -96,11 +93,8 @@ class PatientProfileAppBar extends StatelessWidget {
Expanded(
child: AppText(
patient.firstName != null
? (Utils.capitalize(patient.firstName) +
" " +
Utils.capitalize(patient.lastName))
: Utils.capitalize(patient.fullName ??
patient.patientDetails!.fullName),
? (Utils.capitalize(patient.firstName) + " " + Utils.capitalize(patient.lastName))
: Utils.capitalize(patient.fullName ?? patient.patientDetails!.fullName),
fontSize: SizeConfig.textMultiplier! * 1.8,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
@ -133,15 +127,12 @@ class PatientProfileAppBar extends StatelessWidget {
),
Row(children: [
Padding(
padding: EdgeInsets.only(
left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
child: Container(
width: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
height: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
child: Image.asset(
gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
@ -164,29 +155,18 @@ class PatientProfileAppBar extends StatelessWidget {
color: AppGlobal.appGreenColor,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
)
: AppText(
TranslationBase.of(context).notArrived,
color: Colors.red[800]!,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
),
patient.startTime != null
? AppText(
patient.startTime != null
? patient.startTime!
: '',
fontWeight: FontWeight.w700,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
color: Color(0xFF2E303A))
? AppText(patient.startTime != null ? patient.startTime! : '',
fontWeight: FontWeight.w700, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, color: Color(0xFF2E303A))
: SizedBox()
],
))
@ -199,9 +179,7 @@ class PatientProfileAppBar extends StatelessWidget {
children: [
AppText(
TranslationBase.of(context).fileNumber,
fontSize:
SizeConfig.getTextMultiplierBasedOnWidth() *
3,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
@ -210,9 +188,7 @@ class PatientProfileAppBar extends StatelessWidget {
),
AppText(
patient.patientId.toString(),
fontSize:
SizeConfig.getTextMultiplierBasedOnWidth() *
3.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
@ -222,14 +198,9 @@ class PatientProfileAppBar extends StatelessWidget {
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality ??
patient.nationalityId ??
'',
patient.nationalityName ?? patient.nationality ?? patient.nationalityId ?? '',
fontWeight: FontWeight.bold,
fontSize:
SizeConfig.getTextMultiplierBasedOnWidth() *
3.5,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
),
patient.nationalityFlagURL != null
? ClipRRect(
@ -238,9 +209,7 @@ class PatientProfileAppBar extends StatelessWidget {
patient.nationalityFlagURL!,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace? stackTrace) {
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
return Text('No Image');
},
))
@ -256,42 +225,29 @@ class PatientProfileAppBar extends StatelessWidget {
"${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails!.dateofBirth ?? "" : patient.dateofBirth ?? "", context, isServerFormat: !isFromLiveCare)}",
),
if (patient.appointmentDate != null &&
patient.appointmentDate!.isNotEmpty &&
!isFromLabResult)
if (patient.appointmentDate != null && patient.appointmentDate!.isNotEmpty && !isFromLabResult)
HeaderRow(
label:
TranslationBase.of(context).appointmentDate + " : ",
value: AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
patient.appointmentDate!)),
label: TranslationBase.of(context).appointmentDate + " : ",
value: AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(patient.appointmentDate!)),
),
if (isFromLabResult)
HeaderRow(
label: "Result Date: ",
value:
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
value: '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
),
// if(isInpatient)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (patient.admissionDate != null &&
patient.admissionDate!.isNotEmpty)
if (patient.admissionDate != null && patient.admissionDate!.isNotEmpty)
HeaderRow(
label: patient.admissionDate == null
? ""
: TranslationBase.of(context).admissionDate +
" : ",
value: patient.admissionDate == null
? ""
: "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate.toString())))}",
label: patient.admissionDate == null ? "" : TranslationBase.of(context).admissionDate + " : ",
value: patient.admissionDate == null ? "" : "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate.toString())))}",
),
if (patient.admissionDate != null)
HeaderRow(
label: "${TranslationBase.of(context).numOfDays}: ",
value: isDischargedPatient &&
patient.dischargeDate != null
value: isDischargedPatient && patient.dischargeDate != null
? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate!)).inDays + 1}"
: "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate!)).inDays + 1}",
)
@ -308,17 +264,12 @@ class PatientProfileAppBar extends StatelessWidget {
Container(
width: 30,
height: 30,
margin: EdgeInsets.only(
left: projectViewModel.isArabic ? 10 : 85,
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 10 : 85, right: projectViewModel.isArabic ? 85 : 10, top: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border(
bottom:
BorderSide(color: Colors.grey[400]!, width: 2.5),
left:
BorderSide(color: Colors.grey[400]!, width: 2.5),
bottom: BorderSide(color: Colors.grey[400]!, width: 2.5),
left: BorderSide(color: Colors.grey[400]!, width: 2.5),
)),
),
Expanded(
@ -340,65 +291,50 @@ class PatientProfileAppBar extends StatelessWidget {
flex: 5,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
Utils.convertToTitleCase(
'${TranslationBase.of(context).dr}$doctorName'),
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
isCopyable: true,
),
if (orderNo != null && !isPrescriptions)
HeaderRow(
label: 'Order No: ',
value: orderNo ?? '',
),
if (invoiceNO != null && !isPrescriptions)
HeaderRow(
label: 'Invoice: ',
value: invoiceNO ?? "",
),
if (branch != null)
HeaderRow(
label: 'Branch: ',
value: branch ?? '',
),
if (clinic != null)
Container(
width:
MediaQuery.of(context).size.width *
0.51,
child: HeaderRow(
label: 'Clinic: ',
value: Utils.convertToTitleCase(
clinic) ??
'',
isExpanded: true),
),
if (isMedicalFile && episode != null)
HeaderRow(
label: 'Episode: ',
value: episode ?? '',
),
if (isMedicalFile && visitDate != null)
HeaderRow(
label: 'Visit Date: ',
value: visitDate ?? '',
),
if (!isMedicalFile)
HeaderRow(
label: !isPrescriptions
? 'Result Date:'
: 'Prescriptions Date ',
value:
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
),
]),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(
Utils.convertToTitleCase('${TranslationBase.of(context).dr}$doctorName'),
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
isCopyable: true,
),
if (orderNo != null && !isPrescriptions)
HeaderRow(
label: 'Order No: ',
value: orderNo ?? '',
),
if (invoiceNO != null && !isPrescriptions)
HeaderRow(
label: 'Invoice: ',
value: invoiceNO ?? "",
),
if (branch != null)
HeaderRow(
label: 'Branch: ',
value: branch ?? '',
),
if (clinic != null)
Container(
width: MediaQuery.of(context).size.width * 0.51,
child: HeaderRow(label: 'Clinic: ', value: Utils.convertToTitleCase(clinic) ?? '', isExpanded: true),
),
if (isMedicalFile && episode != null)
HeaderRow(
label: 'Episode: ',
value: episode ?? '',
),
if (isMedicalFile && visitDate != null)
HeaderRow(
label: 'Visit Date: ',
value: visitDate ?? '',
),
if (!isMedicalFile)
HeaderRow(
label: !isPrescriptions ? 'Result Date:' : 'Prescriptions Date ',
value: '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
),
]),
),
),
],
@ -425,7 +361,6 @@ class PatientProfileAppBar extends StatelessWidget {
? 137
: SizeConfig.isHeightShort
? 190
: SizeConfig.heightMultiplier! *
(SizeConfig.isWidthLarge ? 25 : 20)
: SizeConfig.heightMultiplier! * (SizeConfig.isWidthLarge ? 25 : 20)
: height);
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -15,14 +15,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
final String? arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidget(
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to,
this.isInpatient = false});
ProfileMedicalInfoWidget({Key? key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient = false});
@override
Widget build(BuildContext context) {
@ -37,159 +30,187 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
crossAxisCount: 3,
children: [
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'assets/images/svgs/profile_screen/vital signs.svg',
onTap: () {},
),
// if (selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg', onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).special,
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).special,
icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient!,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient!,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/health summary.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'assets/images/svgs/profile_screen/ECG.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg',
onTap: () {},
),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg',
onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
route: PATIENT_UCAF_REQUEST,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'assets/images/svgs/profile_screen/ECG.svg'),
PatientProfileButton(
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png',
onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: REFER_PATIENT_TO_DOCTOR,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png',
onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: PATIENT_ADMISSION_REQUEST,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png',
onTap: () {},
),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg',
onTap: () {},
),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
route: ORDER_NOTE,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
icon: 'assets/images/svgs/profile_screen/Progress notes.svg', onTap: () {},
),
],
),
);

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -16,15 +16,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
final bool isInpatient;
final bool isDischargedPatient;
ProfileMedicalInfoWidgetInPatient(
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to,
this.isInpatient = false,
this.isDischargedPatient = false});
ProfileMedicalInfoWidgetInPatient({Key? key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient = false, this.isDischargedPatient = false});
@override
Widget build(BuildContext context) {
@ -39,149 +31,176 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
crossAxisCount: 3,
children: [
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'assets/images/svgs/profile_screen/vital signs.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/health summary.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).patient,
nameLine2:TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
icon: 'assets/images/svgs/profile_screen/order prescription.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
//TranslationBase.of(context).orders,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
//TranslationBase.of(context).orders,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg', onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: HEALTH_SUMMARY,
nameLine1: "Medical",
//Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report",
//Report
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: HEALTH_SUMMARY,
nameLine1: "Medical",
//Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report",
//Report
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg',
onTap: () {},
),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'),
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg',
onTap: () {},
),
],
),
);

@ -1,10 +1,9 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProfileMedicalInfoWidgetSearch extends StatefulWidget {
@ -16,24 +15,13 @@ class ProfileMedicalInfoWidgetSearch extends StatefulWidget {
final bool isInpatient;
final bool isDischargedPatient;
ProfileMedicalInfoWidgetSearch(
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to,
this.isInpatient = false,
this.isDischargedPatient = false});
ProfileMedicalInfoWidgetSearch({Key? key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient = false, this.isDischargedPatient = false});
@override
State<ProfileMedicalInfoWidgetSearch> createState() =>
_ProfileMedicalInfoWidgetSearchState();
State<ProfileMedicalInfoWidgetSearch> createState() => _ProfileMedicalInfoWidgetSearchState();
}
class _ProfileMedicalInfoWidgetSearchState
extends State<ProfileMedicalInfoWidgetSearch>
with SingleTickerProviderStateMixin {
class _ProfileMedicalInfoWidgetSearchState extends State<ProfileMedicalInfoWidgetSearch> with SingleTickerProviderStateMixin {
late TabController _tabController;
void initState() {
@ -64,169 +52,176 @@ class _ProfileMedicalInfoWidgetSearchState
crossAxisCount: 3,
children: [
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
from: widget.from,
to: widget.to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
from: widget.from,
to: widget.to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'assets/images/svgs/profile_screen/vital signs.svg',
onTap: () {},
),
// if (selectedPatientType != 7)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon:
'assets/images/svgs/profile_screen/health summary.svg'),
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg', onTap: () {},
),
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
isInPatient: widget.isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon:
'assets/images/svgs/profile_screen/health summary.svg'),
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
isInPatient: widget.isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/health summary.svg',
onTap: () {},
),
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'assets/images/svgs/profile_screen/ECG.svg',
onTap: () {},
),
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg',
onTap: () {},
),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg',
onTap: () {},
),
if (widget.patient!.appointmentNo != null && widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_ECG,
route: PATIENT_UCAF_REQUEST,
isDisable: widget.patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'assets/images/svgs/profile_screen/ECG.svg'),
PatientProfileButton(
nameLine2: TranslationBase.of(context).ucaf,
icon: 'assets/images/svgs/profile_screen/UCAF.svg',
onTap: () {},
),
if (widget.patient!.appointmentNo != null && widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ORDER_PRESCRIPTION_OLD,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon:
'assets/images/svgs/profile_screen/order prescription.svg'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: REFER_PATIENT_TO_DOCTOR,
isDisable: widget.patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'assets/images/svgs/profile_screen/refer patient.svg',
onTap: () {},
),
if (widget.patient!.appointmentNo != null && widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon:
'assets/images/svgs/profile_screen/Order Procedures.svg'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: PATIENT_ADMISSION_REQUEST,
isDisable: widget.patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'assets/images/svgs/profile_screen/admission req.svg',
onTap: () {},
),
if (widget.isInpatient)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon:
'assets/images/svgs/profile_screen/insurance approval.svg'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg',
onTap: () {},
),
if (widget.isInpatient)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon:
'assets/images/svgs/profile_screen/patient sick leave.svg'),
if (widget.patient!.appointmentNo != null &&
widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable: widget.patient!.patientStatusType != 43
? true
: false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'assets/images/svgs/profile_screen/UCAF.svg'),
if (widget.patient!.appointmentNo != null &&
widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable: widget.patient!.patientStatusType != 43
? true
: false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon:
'assets/images/svgs/profile_screen/refer patient.svg'),
if (widget.patient!.appointmentNo != null &&
widget.patient!.appointmentNo != 0)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable: widget.patient!.patientStatusType != 43
? true
: false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon:
'assets/images/svgs/profile_screen/admission req.svg'),
if (widget.isInpatient)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon:
'assets/images/svgs/profile_screen/Progress notes.svg'),
if (widget.isInpatient)
PatientProfileButton(
key: widget.key,
patient: widget.patient,
patientType: widget.patientType,
arrivalType: widget.arrivalType,
route: ORDER_NOTE,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
icon:
'assets/images/svgs/profile_screen/Progress notes.svg'),
route: ORDER_NOTE,
nameLine1: "Order",
//"Text",
nameLine2: "Sheet",
icon: 'assets/images/svgs/profile_screen/Progress notes.svg', onTap: () {},
),
],
),
),

@ -18,7 +18,7 @@ class AppScaffold extends StatelessWidget {
final BaseViewModel? baseViewModel;
final Widget? bottomSheet;
final Color? backgroundColor;
final Widget? appBar;
final PreferredSizeWidget? appBar;
final Widget? drawer;
final Widget? bottomNavigationBar;
final String? subtitle;
@ -29,7 +29,7 @@ class AppScaffold extends StatelessWidget {
{this.appBarTitle = '',
this.body,
this.isLoading = false,
this.isShowAppBar = true,
this.isShowAppBar = false,
this.baseViewModel,
this.bottomSheet,
this.backgroundColor,
@ -49,51 +49,51 @@ class AppScaffold extends StatelessWidget {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
drawer: drawer,
extendBody: extendBody,
bottomNavigationBar: bottomNavigationBar,
appBar: isShowAppBar && appBar != null
? appBar as PreferredSizeWidget
: AppBar(
elevation: 0,
backgroundColor: Colors.white,
//HexColor('#515B5D'),
titleTextStyle: TextStyle(
color: Colors.black87,
fontSize: 16.8,
),
title: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(appBarTitle.toUpperCase()),
if (subtitle != null)
Text(
subtitle!,
style: TextStyle(fontSize: 12, color: Colors.red),
),
],
),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
isHomeIcon
? IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
)
: SizedBox()
],
),
appBar: isShowAppBar
? appBar != null
? appBar as PreferredSizeWidget
: AppBar(
elevation: 0,
backgroundColor: Colors.white,
//HexColor('#515B5D'),
titleTextStyle: TextStyle(
color: Colors.black87,
fontSize: 16.8,
),
title: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(appBarTitle.toUpperCase()),
if (subtitle != null)
Text(
subtitle!,
style: TextStyle(fontSize: 12, color: Colors.red),
),
],
),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
isHomeIcon
? IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(context, HOME, (r) => false),
)
: SizedBox()
],
)
: null,
bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection
? baseViewModel != null
@ -101,8 +101,7 @@ class AppScaffold extends StatelessWidget {
baseViewModel: baseViewModel!,
child: body!,
)
: Stack(
children: <Widget>[body!, buildAppLoaderWidget(isLoading)])
: Stack(children: <Widget>[body!, buildAppLoaderWidget(isLoading)])
: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

@ -1,16 +1,15 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class AppText extends StatefulWidget {
final String text;
final String? variant;
final Color color;
final Color? color;
final FontWeight? fontWeight;
final double? fontSize;
final double? fontHeight;
final String fontFamily;
final String? fontFamily;
final int maxLength;
final bool italic;
final double? margin;
@ -20,9 +19,9 @@ class AppText extends StatefulWidget {
final double marginLeft;
final double? letterSpacing;
final TextAlign? textAlign;
final bool bold;
final bool regular;
final bool medium;
final bool? bold;
final bool? regular;
final bool? medium;
final int? maxLines;
final bool readMore;
final String? style;
@ -48,9 +47,9 @@ class AppText extends StatefulWidget {
this.marginBottom = 0,
this.marginLeft = 0,
this.textAlign,
this.bold = false,
this.regular = false,
this.medium = false,
this.bold,
this.regular,
this.medium,
this.maxLines,
this.readMore = false,
this.style,
@ -97,13 +96,7 @@ class _AppTextState extends State<AppText> {
Widget build(BuildContext context) {
return GestureDetector(
child: Container(
margin: widget.margin != null
? EdgeInsets.all(widget.margin!)
: EdgeInsets.only(
top: widget.marginTop,
right: widget.marginRight,
bottom: widget.marginBottom,
left: widget.marginLeft),
margin: widget.margin != null ? EdgeInsets.all(widget.margin!) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
@ -118,21 +111,16 @@ class _AppTextState extends State<AppText> {
right: 0,
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0),
],
begin: Alignment.bottomCenter,
end: Alignment.topCenter)),
gradient: LinearGradient(colors: [
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.background.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter)),
height: 30,
),
)
],
),
if (widget.allowExpand &&
widget.readMore &&
text.length > widget.maxLength)
if (widget.allowExpand && widget.readMore && text.length > widget.maxLength)
Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell(
@ -171,13 +159,7 @@ class _AppTextState extends State<AppText> {
),
child: Container(
child: SelectableText(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
!hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)),
textAlign: widget.textAlign,
// overflow: widget.maxLines != null
// ? ((widget.maxLines > 1)
@ -188,51 +170,42 @@ class _AppTextState extends State<AppText> {
style: widget.style != null
? _getFontStyle()!.copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
fontSize: widget.fontSize ?? _getFontSize(),
color: widget.color,
fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color:
widget.color != null ? widget.color : Color(0xff2E303A),
color: widget.color != null ? widget.color : Color(0xff2E303A),
fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ??
(widget.variant == "overline" ? 1.5 : null),
letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins',
decoration: widget.textDecoration,
height: widget.fontHeight),
height: widget.fontHeight,
),
),
),
);
} else {
return Text(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
!hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)),
textAlign: widget.textAlign,
overflow: widget.maxLines != null
? ((widget.maxLines! > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
overflow: widget.maxLines != null ? ((widget.maxLines! > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null,
maxLines: widget.maxLines ?? null,
style: widget.style != null
? _getFontStyle()!.copyWith(
? _getFontStyle()?.copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
fontSize: widget.fontSize ?? _getFontSize(),
color: widget.color,
fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight)
height: widget.fontHeight,
)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color != null ? widget.color : Colors.black,
fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ??
(widget.variant == "overline" ? 1.5 : null),
letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins',
decoration: widget.textDecoration,
@ -265,8 +238,6 @@ class _AppTextState extends State<AppText> {
return Theme.of(context).textTheme.labelSmall;
case "button":
return Theme.of(context).textTheme.labelLarge;
default:
return TextStyle();
}
}

@ -24,8 +24,8 @@ class AppTextFieldCustom extends StatefulWidget {
final int minLines;
final int maxLines;
final List<TextInputFormatter>? inputFormatters;
final Function(String? value) onChanged;
final Function onFieldSubmitted;
final Function(String value) onChanged;
final Function() onFieldSubmitted;
final String? validationError;
final bool isPrscription;

@ -24,7 +24,7 @@ class AppTextFieldCustomSearch extends StatelessWidget {
final TextEditingController? searchController;
final Function onChangeFun;
final Function(String val) onChangeFun;
final Function onFieldSubmitted;
final Widget? positionedChild;
@ -59,8 +59,12 @@ class AppTextFieldCustomSearch extends StatelessWidget {
onPressed: () {},
),
controller: searchController,
onChanged: onChangeFun(),
onFieldSubmitted: onFieldSubmitted(),
onChanged: (val) {
onChangeFun(val);
},
onFieldSubmitted: () {
onFieldSubmitted();
},
validationError: validationError,
onClick: () {},
),

Loading…
Cancel
Save