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 return true
} }
override fun onDoubleTap(e: MotionEvent?): Boolean { override fun onDoubleTap(e: MotionEvent): Boolean {
miniCircleDoubleTap() miniCircleDoubleTap()
return super.onDoubleTap(e) return super.onDoubleTap(e)
} }

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

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

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

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

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

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

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

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

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

@ -1,26 +1,22 @@
import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:doctor_app_flutter/config/size_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/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/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/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/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/locator.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.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/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/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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_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/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.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:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../routes.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
Utils helpers = Utils(); Utils helpers = Utils();
@ -34,14 +30,15 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
ProjectViewModel? projectViewModel; ProjectViewModel? projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<ERSignInViewModel>( return BaseView<ERSignInViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientSearchHeader(title: "ER Sign In",) appBar: PatientSearchHeader(
, title: "ER Sign In",
),
body: Center( body: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight! / 7), margin: EdgeInsets.only(top: SizeConfig.realScreenHeight! / 7),
@ -58,10 +55,7 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
SizedBox( SizedBox(
height: 7, height: 7,
), ),
AppText(TranslationBase.of(context).scanERQrCode, AppText(TranslationBase.of(context).scanERQrCode, fontSize: 14, fontWeight: FontWeight.w400, textAlign: TextAlign.center),
fontSize: 14,
fontWeight: FontWeight.w400,
textAlign: TextAlign.center),
SizedBox( SizedBox(
height: 15, height: 15,
), ),
@ -95,130 +89,128 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
_scanQrAndGetPatient(BuildContext context, ERSignInViewModel model) async { _scanQrAndGetPatient(BuildContext context, ERSignInViewModel model) async {
var result = (await BarcodeScanner.scan()).rawContent; var result = (await BarcodeScanner.scan()).rawContent;
if (result != "") { if (result != "") {
try{ try {
List<String> listOfParams = result.split(','); List<String> listOfParams = result.split(',');
int patientID = 0; int patientID = 0;
if (listOfParams[0].length != 0) if (listOfParams[0].length != 0) patientID = int.parse(listOfParams[0]);
patientID = int.parse(listOfParams[0]); showMyDialog(
showMyDialog(context:context, firstAction: (){ context: context,
signInERPatient(context: context, model: model, patientId: patientID, signInType: 1); firstAction: () {
} , secondAction: (){ signInERPatient(context: context, model: model, patientId: patientID, signInType: 1);
signInERPatient(context: context, model: model, patientId: patientID, signInType: 2); },
secondAction: () {
} ); signInERPatient(context: context, model: model, patientId: patientID, signInType: 2);
}catch(e){ });
} catch (e) {
Utils.showErrorToast("Please Enter Valid Code"); 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!); GifLoaderDialogUtils.showMyDialog(context!);
await model!.signInERPatient(patientId:patientId, signInType: signInType ); await model!.signInERPatient(patientId: patientId, signInType: signInType);
if(model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast("Add successfully"); DrAppToastMsg.showSuccesToast("Add successfully");
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
/// TODO Elham* Make this as custom Dialog /// TODO Elham* Make this as custom Dialog
showMyDialog({BuildContext? context, Function? firstAction,Function? secondAction, }) { showMyDialog({
BuildContext? context,
Function? firstAction,
Function? secondAction,
}) {
showDialog( showDialog(
context: context!, context: context!,
builder: (ctx) => Center( builder: (ctx) => Center(
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
height: 250, height: 250,
child: AppScaffold( child: AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: Container( body: Container(
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// SizedBox(height: 20,),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
AppText( // SizedBox(height: 20,),
"Select option", SizedBox(
fontWeight: FontWeight.w600, height: 10,
color: Colors.black, ),
fontSize: 16, 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( Container(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
projectViewModel!.isArabic projectViewModel!.isArabic ? "الرجاء اختيار الإجراء الذي تريد القيام به" : 'Please choose the action you want to do ',
? "الرجاء اختيار الإجراء الذي تريد القيام به" fontSize: 15,
: 'Please choose the action you want to do ', textAlign: TextAlign.center,
fontSize: 15, ),
textAlign: TextAlign.center, ),
),
),
SizedBox( SizedBox(
height: 8, 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; late ProjectViewModel projectsProvider;
bool isMoreOption = false; bool isMoreOption = false;
bool onlySMSBox = false; bool onlySMSBox = false;
late AuthMethodTypes fingerPrintBefore; AuthMethodTypes fingerPrintBefore = AuthMethodTypes.Fingerprint;
late AuthMethodTypes selectedOption; late AuthMethodTypes selectedOption;
late AuthenticationViewModel authenticationViewModel; late AuthenticationViewModel authenticationViewModel;
@ -94,7 +94,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.72, letterSpacing: -0.72,
), ),
AppText( AppText(
Utils.convertToTitleCase(authenticationViewModel.user.doctorName ?? ""), Utils.convertToTitleCase(authenticationViewModel.user!.doctorName!),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 6, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 6,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -153,7 +153,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.4), letterSpacing: -0.4),
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(
text: authenticationViewModel.getType(authenticationViewModel.user.logInTypeID, context), text: authenticationViewModel.getType(authenticationViewModel.user!.logInTypeID, context),
style: TextStyle( style: TextStyle(
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
@ -172,10 +172,10 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
authenticationViewModel.user.editedOn != null authenticationViewModel.user!.editedOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn!), isMonthShort: true) ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user!.editedOn!), isMonthShort: true)
: authenticationViewModel.user.createdOn != null : authenticationViewModel.user!.createdOn != null
? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn!), isMonthShort: true) ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user!.createdOn!), isMonthShort: true)
: '--', : '--',
textAlign: TextAlign.right, textAlign: TextAlign.right,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
@ -184,10 +184,10 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
AppText( AppText(
authenticationViewModel.user.editedOn != null authenticationViewModel.user!.editedOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn!)) ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user!.editedOn!))
: authenticationViewModel.user.createdOn != null : authenticationViewModel.user!.createdOn != null
? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn!)) ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user!.createdOn!))
: '--', : '--',
textAlign: TextAlign.right, textAlign: TextAlign.right,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
@ -250,7 +250,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
}, },
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!), authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!),
authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive), authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
)), )),
), ),
@ -350,7 +350,6 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
sendActivationCodeByOtpNotificationType(AuthMethodTypes authMethodType) async { sendActivationCodeByOtpNotificationType(AuthMethodTypes authMethodType) async {
if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) { if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await authenticationViewModel.sendActivationCodeForDoctorApp(authMethodType: authMethodType, password: authenticationViewModel.userInfo.password); await authenticationViewModel.sendActivationCodeForDoctorApp(authMethodType: authMethodType, password: authenticationViewModel.userInfo.password);
if (authenticationViewModel.state == ViewState.ErrorLocal) { if (authenticationViewModel.state == ViewState.ErrorLocal) {
Utils.showErrorToast(authenticationViewModel.error); Utils.showErrorToast(authenticationViewModel.error);
@ -422,7 +421,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
new SMSOTP( new SMSOTP(
context, context,
type, type,
authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser!.mobileNumber : authenticationViewModel.user.mobile, authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser!.mobileNumber : authenticationViewModel.user!.mobile,
(value) { (value) {
showDialog( showDialog(
context: context, context: context,
@ -443,8 +442,8 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
await authenticationViewModel.showIOSAuthMessages(); await authenticationViewModel.showIOSAuthMessages();
if (!mounted) return; if (!mounted) return;
if (authenticationViewModel.user != null && if (authenticationViewModel.user != null &&
(SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!) == AuthMethodTypes.Fingerprint || (SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!) == AuthMethodTypes.Fingerprint ||
SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID!) == AuthMethodTypes.FaceID)) { SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user!.logInTypeID!) == AuthMethodTypes.FaceID)) {
this.sendActivationCode(authMethodTypes); this.sendActivationCode(authMethodTypes);
} else { } else {
setState(() { setState(() {

@ -1,12 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_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/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/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.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/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_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/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/ER_singin/ER_singin_screen.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/home/dashboard_slider-item-widget.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/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/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/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/date-utils.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.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/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/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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_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/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.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:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:sticky_headers/sticky_headers/widget.dart'; import 'package:sticky_headers/sticky_headers/widget.dart';
import '../../widgets/shared/app_texts_widget.dart';
import 'label.dart'; import 'label.dart';
class HomeScreen extends StatefulWidget { class HomeScreen extends StatefulWidget {
@ -277,23 +274,41 @@ class _HomeScreenState extends State<HomeScreen> {
colorIndex = 0; colorIndex = 0;
List<LinearGradient> backgroundColors = []; List<LinearGradient> backgroundColors = [];
backgroundColors[0] = LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [ backgroundColors.add(
AppGlobal.appRedColor, LinearGradient(
Color(0xFFAD3B3B), begin: Alignment(-1.0, -2.0),
]); //AppGlobal.appRedColor; end: Alignment(1.0, 2.0),
backgroundColors[1] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [ colors: [
Color(0xFFC9C9C9), AppGlobal.appRedColor,
Color(0xFFC9C9C9), Color(0xFFAD3B3B),
]); ],
backgroundColors[2] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [Color(0xFF71787E), AppGlobal.appTextColor]); ),
); //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 = []; List<Color> backgroundIconColors = [];
backgroundIconColors[0] = Colors.white12; backgroundIconColors.add(Colors.white12);
backgroundIconColors[1] = Colors.white38; backgroundIconColors.add(Colors.white38);
backgroundIconColors[2] = Colors.white10; backgroundIconColors.add(Colors.white10);
List<Color> textColors = []; List<Color> textColors = [];
textColors[0] = Colors.white; textColors.add(Colors.white);
textColors[1] = Color(0xFF353E47); textColors.add(Color(0xFF353E47));
textColors[2] = Colors.white; textColors.add(Colors.white);
List<HomePatientCard> patientCards = []; List<HomePatientCard> patientCards = [];

@ -1,16 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_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/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/livecare/session_status_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin.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/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/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/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/utils/video_channel_utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.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'; 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({ const EndCallScreen({
Key? key, Key? key,
this.patient, this.patient,
}) : super(key: key); }) : super(key: key);
@override @override
@ -233,7 +233,8 @@ class _EndCallScreenState extends State<EndCallScreen> {
isInPatient: cardsList[index].isInPatient, isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient, isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable, isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap!, onTap: cardsList[index].onTap,
//cardsList[index].onTap!(),
isLoading: cardsList[index].isLoading, isLoading: cardsList[index].isLoading,
isDartIcon: cardsList[index].isDartIcon, isDartIcon: cardsList[index].isDartIcon,
dartIcon: cardsList[index].dartIcon!, dartIcon: cardsList[index].dartIcon!,

@ -1,4 +1,5 @@
import 'dart:math'; import 'dart:math';
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.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/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_shared_pref.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/extenstions_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/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/medicine/medicine_item_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_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/app_texts_widget.dart';
@ -42,8 +42,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
String _currentLocaleId = ""; String _currentLocaleId = "";
final SpeechToText speech = SpeechToText(); final SpeechToText speech = SpeechToText();
String lastStatus = ''; String lastStatus = '';
GlobalKey key = GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
String? lastError; String? lastError;
double level = 0.0; double level = 0.0;
@ -56,13 +55,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
super.didChangeDependencies(); super.didChangeDependencies();
} }
Future<void> initSpeechState() async { Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize( bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
onError: errorListener, onStatus: statusListener); _currentLocaleId = TranslationBase.of(context).locale.languageCode == 'en' ? 'en-GB' : 'ar-SA'; // systemLocale.localeId;
_currentLocaleId = TranslationBase.of(context).locale.languageCode == 'en'
? 'en-GB'
: 'ar-SA'; // systemLocale.localeId;
if (!mounted) return; if (!mounted) return;
setState(() { setState(() {
@ -72,45 +67,44 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicineViewModel>(onModelReady: (model) async { return BaseView<MedicineViewModel>(
}, builder: (_, model, w) { onModelReady: (model) async {},
myController.text = model.searchText; builder: (_, model, w) {
return AppScaffold( myController.text = model.searchText;
// baseViewModel: model, return AppScaffold(
isShowAppBar: true, // baseViewModel: model,
appBar: BottomSheetTitle( isShowAppBar: true,
title: TranslationBase.of(context).searchMedicine, appBar: BottomSheetTitle(
), title: TranslationBase.of(context).searchMedicine,
body: SingleChildScrollView( ),
child: Column( body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppTextFieldCustomSearch( AppTextFieldCustomSearch(
hintText: hintText: TranslationBase.of(context).searchMedicineNameHere,
TranslationBase.of(context).searchMedicineNameHere,
searchController: myController, searchController: myController,
onFieldSubmitted: (value) { onFieldSubmitted: (value) {
searchMedicine(context, model); searchMedicine(context, model);
}, },
marginTop: 5, onChangeFun: (){}, marginTop: 5,
onChangeFun: (val) {},
), ),
Container( Container(
margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0), margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: AppText( child: AppText(
TranslationBase.of(context).youCanFind + TranslationBase.of(context).youCanFind +
(myController.text != '' (myController.text != '' ? model.pharmacyItemsList.length.toString() : '0') +
? model.pharmacyItemsList.length.toString()
: '0') +
" " + " " +
TranslationBase.of(context).medicineSearchResult +" '${myController.text}'", TranslationBase.of(context).medicineSearchResult +
" '${myController.text}'",
fontHeight: 1.4, fontHeight: 1.4,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
textAlign: TextAlign.start, textAlign: TextAlign.start,
@ -127,33 +121,23 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
if (myController.text != '') if (myController.text != '')
Container( Container(
margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0), margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0),
height: MediaQuery.of(context).size.height * 0.6, height: MediaQuery.of(context).size.height * 0.6,
child: ListView.builder( child: ListView.builder(
padding: const EdgeInsets.only(top: 20), padding: const EdgeInsets.only(top: 20),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
itemCount: model.pharmacyItemsList == null itemCount: model.pharmacyItemsList == null ? 0 : model.pharmacyItemsList.length,
? 0
: model.pharmacyItemsList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return InkWell(
child: MedicineItemWidget( child: MedicineItemWidget(
label: model.pharmacyItemsList[index] label: model.pharmacyItemsList[index]["ItemDescription"],
["ItemDescription"], url: model.pharmacyItemsList[index]["ImageSRCUrl"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"],
), ),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => PharmaciesListScreen( builder: (context) => PharmaciesListScreen(itemID: model.pharmacyItemsList[index]["ItemID"], url: model.pharmacyItemsList[index]["ImageSRCUrl"]),
itemID: model.pharmacyItemsList[index] settings: RouteSettings(name: 'PharmaciesListScreen'),
["ItemID"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"]),
settings: RouteSettings(
name: 'PharmaciesListScreen'),
), ),
); );
}, },
@ -163,45 +147,44 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
), ),
], ],
)), )),
bottomSheet: Container( bottomSheet: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(0.0), Radius.circular(0.0),
), ),
border: Border.all(color: HexColor('#707070'), width: 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,
), ),
Container( height: MediaQuery.of(context).size.height * 0.1,
child: FractionallySizedBox( width: double.infinity,
widthFactor: .80, child: Column(
child: Center( children: [
child: AppButton( SizedBox(
fontWeight: FontWeight.w700, height: 10,
title: TranslationBase.of(context).search, ),
onPressed: () async { Container(
await searchMedicine(context, model); child: FractionallySizedBox(
}, widthFactor: .80,
color: AppGlobal.appRedColor, 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 { searchMedicine(context, MedicineViewModel model) async {
@ -240,8 +223,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
recognizedWord = result.recognizedWords; recognizedWord = result.recognizedWords;
lastStatus = ''; lastStatus = '';
myController.text = recognizedWord!; 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) { void soundLevelListener(double level) {
minSoundLevel = min(minSoundLevel, level); minSoundLevel = min(minSoundLevel, level);
maxSoundLevel = max(maxSoundLevel, 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/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.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/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class InPatientHeader extends StatelessWidget { class InPatientHeader extends StatelessWidget implements PreferredSizeWidget {
InPatientHeader( InPatientHeader({required this.model, required this.specialClinic, this.activeTab, this.selectedMapId, this.onChangeFunc}) : super();
{required this.model,
required this.specialClinic,
this.activeTab,
this.selectedMapId,
this.onChangeFunc})
: super();
final PatientSearchViewModel model; final PatientSearchViewModel model;
final GetSpecialClinicalCareListResponseModel specialClinic; final GetSpecialClinicalCareListResponseModel specialClinic;
final activeTab; final activeTab;
@ -47,9 +41,7 @@ class InPatientHeader extends StatelessWidget {
letterSpacing: -1.44, letterSpacing: -1.44,
), ),
), ),
if (model.specialClinicalCareMappingList.isNotEmpty && if (model.specialClinicalCareMappingList.isNotEmpty && specialClinic != null && activeTab != 2)
specialClinic != null &&
activeTab != 2)
Container( Container(
width: MediaQuery.of(context).size.width * .3, width: MediaQuery.of(context).size.width * .3,
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
@ -57,8 +49,7 @@ class InPatientHeader extends StatelessWidget {
dropdownColor: Colors.white, dropdownColor: Colors.white,
iconEnabledColor: Colors.black, iconEnabledColor: Colors.black,
isExpanded: true, isExpanded: true,
value: selectedMapId ?? value: selectedMapId ?? model.specialClinicalCareMappingList[0].nursingStationID,
model.specialClinicalCareMappingList[0].nursingStationID,
iconSize: 25, iconSize: 25,
elevation: 16, elevation: 16,
selectedItemBuilder: (BuildContext context) { selectedItemBuilder: (BuildContext context) {
@ -83,24 +74,15 @@ class InPatientHeader extends StatelessWidget {
), ),
child: Center( child: Center(
child: AppText( child: AppText(
model.specialClinicalCareMappingList.length model.specialClinicalCareMappingList.length.toString(),
.toString(),
color: Colors.white, color: Colors.white,
fontSize: fontSize: projectsProvider.isArabic ? 10 : 11,
projectsProvider.isArabic ? 10 : 11,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
)), )),
], ],
), ),
AppText( AppText(selectedMapId == null ? TranslationBase.of(context).all : item.description!, fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, textAlign: TextAlign.end),
selectedMapId == null
? TranslationBase.of(context).all
: item.description!,
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.bold,
textAlign: TextAlign.end),
], ],
); );
}).toList(); }).toList();

@ -1,24 +1,25 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.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/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.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/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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.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/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/tab_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../DischargedPatientPage.dart'; import '../DischargedPatientPage.dart';
import 'in_patient_list_page.dart'; import 'in_patient_list_page.dart';
class InPatientScreen extends StatefulWidget { class InPatientScreen extends StatefulWidget {
GetSpecialClinicalCareListResponseModel specialClinic; GetSpecialClinicalCareListResponseModel? specialClinic;
bool isAllClinic = true; bool isAllClinic = true;
bool showBottomSheet = false; bool showBottomSheet = false;
@ -30,11 +31,10 @@ class InPatientScreen extends StatefulWidget {
_InPatientScreenState createState() => _InPatientScreenState(); _InPatientScreenState createState() => _InPatientScreenState();
} }
class _InPatientScreenState extends State<InPatientScreen> class _InPatientScreenState extends State<InPatientScreen> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
late TabController _tabController; late TabController _tabController;
int _activeTab = 0; int _activeTab = 0;
int selectedMapId = 0; int selectedMapId = 0;
@override @override
void initState() { void initState() {
@ -65,9 +65,9 @@ class _InPatientScreenState extends State<InPatientScreen>
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.clearPatientList(); model.clearPatientList();
if (widget.specialClinic != null) { if (widget.specialClinic != null && widget.specialClinic!.clinicID != null) {
await model print(widget.specialClinic!.toJson());
.getSpecialClinicalCareMappingList(widget.specialClinic.clinicID); await model.getSpecialClinicalCareMappingList(widget.specialClinic!.clinicID);
// requestModel.nursingStationID = // requestModel.nursingStationID =
// model.specialClinicalCareMappingList[0].nursingStationID; // model.specialClinicalCareMappingList[0].nursingStationID;
} }
@ -80,7 +80,7 @@ class _InPatientScreenState extends State<InPatientScreen>
appBar: InPatientHeader( appBar: InPatientHeader(
model: model, model: model,
selectedMapId: selectedMapId, selectedMapId: selectedMapId,
specialClinic: widget.specialClinic, specialClinic: widget.specialClinic!,
activeTab: _activeTab, activeTab: _activeTab,
onChangeFunc: (newValue) async { onChangeFunc: (newValue) async {
setState(() { setState(() {
@ -89,18 +89,13 @@ class _InPatientScreenState extends State<InPatientScreen>
model.clearPatientList(); model.clearPatientList();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0);
PatientSearchRequestModel(
nursingStationID: selectedMapId, clinicID: 0);
await model.getInPatientList(requestModel, isLocalBusy: true); await model.getInPatientList(requestModel, isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
onChangeState( onChangeState(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
isAllClinic: true,
showBottomSheet: false,
selectedClinicName: null);
} }
}), }),
body: Column( body: Column(
@ -110,15 +105,12 @@ class _InPatientScreenState extends State<InPatientScreen>
child: Scaffold( child: Scaffold(
extendBodyBehindAppBar: false, extendBodyBehindAppBar: false,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight( preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
MediaQuery.of(context).size.height * 0.070),
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.070, height: MediaQuery.of(context).size.height * 0.070,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.5), //width: 0.7
color: Theme.of(context).dividerColor,
width: 0.5), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Container( child: Container(
@ -132,15 +124,10 @@ class _InPatientScreenState extends State<InPatientScreen>
indicator: BoxDecoration(), indicator: BoxDecoration(),
// indicatorSize: TabBarIndicatorSize.tab, // indicatorSize: TabBarIndicatorSize.tab,
// labelColor: Theme.of(context).primaryColor, // labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only( labelPadding: EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
top: 0, left: 0, right: 0, bottom: 0),
// unselectedLabelColor: Colors.grey[800], // unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
tabWidget(screenSize, _activeTab == 0, tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll, context: context, counter: model.inPatientList.length, isFirst: true),
TranslationBase.of(context).inPatientAll,
context: context,
counter: model.inPatientList.length,
isFirst: true),
tabWidget( tabWidget(
screenSize, screenSize,
_activeTab == 1, _activeTab == 1,
@ -204,30 +191,16 @@ class _InPatientScreenState extends State<InPatientScreen>
}); });
} }
Widget tabWidget(Size screenSize, bool isActive, String title, Widget tabWidget(Size screenSize, bool isActive, String title, {int counter = -1, bool isFirst = false, bool isMiddle = false, bool isLast = false, BuildContext? context}) {
{int counter = -1,
bool isFirst = false,
bool isMiddle = false,
bool isLast = false,
BuildContext? context}) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context!); ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context!);
return Center( return Center(
child: Container( child: Container(
height: TabUtils.getTabHeight(context!), height: TabUtils.getTabHeight(context!),
decoration: TabUtils.getBoxTabsBoxDecoration( decoration: TabUtils.getBoxTabsBoxDecoration(isActive: isActive, isFirst: isFirst, isMiddle: isMiddle, isLast: isLast, projectViewModel: projectsProvider),
isActive: isActive,
isFirst: isFirst,
isMiddle: isMiddle,
isLast: isLast,
projectViewModel: projectsProvider),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [TabUtils.getTabText(title: title, isActive: isActive), if (counter != -1) TabUtils.getTabCounter(isActive: isActive, counter: counter)],
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/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import '../../../routes.dart'; import '../../../routes.dart';
import 'NoData.dart'; import 'NoData.dart';
@ -27,54 +28,45 @@ class ListOfAllInPatient extends StatelessWidget {
? NoData() ? NoData()
: NotificationListener( : NotificationListener(
child: ListView.builder( child: ListView.builder(
itemCount: itemCount: patientSearchViewModel.filteredInPatientItems.length,
patientSearchViewModel.filteredInPatientItems.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return PatientCard( return PatientCard(
patientInfo: patientSearchViewModel patientInfo: patientSearchViewModel.filteredInPatientItems[index],
.filteredInPatientItems[index],
patientType: "1", patientType: "1",
arrivalType: "1", arrivalType: "1",
isInpatient: true, isInpatient: true,
isMyPatient: patientSearchViewModel isMyPatient: patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID,
.filteredInPatientItems[index].doctorId ==
patientSearchViewModel.doctorProfile!.doctorID,
onTap: () { onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
} }
Navigator.of(context) SchedulerBinding.instance.addPostFrameCallback((_) {
.pushNamed(PATIENTS_PROFILE, arguments: { Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patientSearchViewModel "patient": patientSearchViewModel.filteredInPatientItems[index],
.filteredInPatientItems[index], "patientType": "1",
"patientType": "1", "from": "0",
"from": "0", "to": "0",
"to": "0", "isSearch": false,
"isSearch": false, "isInpatient": true,
"isInpatient": true, "arrivalType": "1",
"arrivalType": "1", "isMyPatient": patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID,
"isMyPatient": patientSearchViewModel });
.filteredInPatientItems[index].doctorId ==
patientSearchViewModel.doctorProfile!.doctorID,
}); });
}, },
); );
}), }),
onNotification: (notification) { onNotification: (notification) {
if (isAllClinic && !hasQuery) if (notification if (isAllClinic && !hasQuery) if (notification is ScrollUpdateNotification) {
is ScrollUpdateNotification) { if (notification.metrics.pixels >= notification.metrics.maxScrollExtent - 50) {
if (notification.metrics.pixels >=
notification.metrics.maxScrollExtent - 50) {
patientSearchViewModel.addOnFilteredList(); patientSearchViewModel.addOnFilteredList();
} }
if (notification.metrics.pixels <= if (notification.metrics.pixels <= notification.metrics.minScrollExtent - 50) {
notification.metrics.minScrollExtent - 50) {
patientSearchViewModel.removeOnFilteredList(); patientSearchViewModel.removeOnFilteredList();
} }
} }

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

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

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

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

@ -15,107 +15,129 @@ class ProfileGridForSearch extends StatelessWidget {
String? from; String? from;
String? to; String? to;
ProfileGridForSearch( ProfileGridForSearch({Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to}) : super(key: key);
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient = false,
this.from,
this.to})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [ final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).vital, TranslationBase.of(context).vital,
TranslationBase.of(context).signs, TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS, VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg', 'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).lab,
TranslationBase.of(context).result, TranslationBase.of(context).result,
LAB_RESULT, LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg', 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).lab,
TranslationBase.of(context).special, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg', 'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).radiology, TranslationBase.of(context).radiology,
TranslationBase.of(context).service, TranslationBase.of(context).service,
RADIOLOGY_PATIENT, RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/health summary.svg', 'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).orders, TranslationBase.of(context).orders,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD, ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg', 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
TranslationBase.of(context).prescription, TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW, ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg', 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient), 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( PatientProfileCardModel(
TranslationBase.of(context).health, TranslationBase.of(context).patient,
TranslationBase.of(context).summary, "ECG",
HEALTH_SUMMARY, PATIENT_ECG,
'assets/images/svgs/profile_screen/health summary.svg', 'assets/images/svgs/profile_screen/ECG.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", //onTap: () {},
PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', ),
isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).orders, TranslationBase.of(context).orders,
TranslationBase.of(context).procedures, TranslationBase.of(context).procedures,
ORDER_PROCEDURE, ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg', 'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).insurance, TranslationBase.of(context).insurance,
TranslationBase.of(context).service, TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW, PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/vital signs.svg', 'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patientSick, TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave, TranslationBase.of(context).leave,
ADD_SICKLEAVE, ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg', 'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient), isInPatient: isInpatient,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0) if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf, TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST, PATIENT_UCAF_REQUEST,
'assets/images/svgs/profile_screen/UCAF.svg', 'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false), isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0) if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).referral, TranslationBase.of(context).referral,
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR, REFER_PATIENT_TO_DOCTOR,
'assets/images/svgs/profile_screen/refer patient.svg', 'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false), isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0) if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).admission, TranslationBase.of(context).admission,
TranslationBase.of(context).request, TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST, PATIENT_ADMISSION_REQUEST,
'assets/images/svgs/profile_screen/admission req.svg', 'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient!.patientStatusType != 43 ? true : false), isDisable: patient!.patientStatusType != 43 ? true : false,
//onTap: () {},
),
]; ];
return Padding( return Padding(
@ -145,7 +167,8 @@ class ProfileGridForSearch extends StatelessWidget {
isInPatient: item.isInPatient, isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient, isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable, isDisable: item.isDisable,
onTap: item.onTap!, onTap: () {},
//item.onTap(),
isLoading: item.isLoading, isLoading: item.isLoading,
); );
}).toList(), }).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:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BottomSheetTitle extends StatelessWidget { class BottomSheetTitle extends StatelessWidget implements PreferredSizeWidget {
BottomSheetTitle({ BottomSheetTitle({
Key? key, Key? key,
this.title = '', this.title = '',
@ -33,14 +33,7 @@ class BottomSheetTitle extends StatelessWidget {
text: TextSpan( text: TextSpan(
style: TextStyle(fontSize: 20, color: Colors.black), style: TextStyle(fontSize: 20, color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(text: title, style: TextStyle(color: Color(0xFF2B353E), fontWeight: FontWeight.w700, fontFamily: 'Poppins', letterSpacing: -1.44, fontSize: 24.0)),
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: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
}, },
child: Icon(DoctorApp.close_1, child: Icon(DoctorApp.close_1, size: SizeConfig.getTextMultiplierBasedOnWidth() * 5, color: Color(0xFF2B353E)))
size: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
color: Color(0xFF2B353E)))
], ],
), ),
], ],

@ -49,13 +49,8 @@ class SMSOTP {
displayDialog(BuildContext context) async { displayDialog(BuildContext context) async {
double dialogWidth = MediaQuery.of(context).size.width * 0.90; double dialogWidth = MediaQuery.of(context).size.width * 0.90;
double dialogInputWidth = (dialogWidth / 4) - double dialogInputWidth = (dialogWidth / 4) - (SizeConfig.isWidthLarge ? SizeConfig.getWidthMultiplier(width: dialogWidth) * 4.5 : 20);
(SizeConfig.isWidthLarge double dialogHeight = SizeConfig.isHeightVeryShort ? MediaQuery.of(context).size.height * 0.50 : MediaQuery.of(context).size.height * 0.40;
? 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( return showDialog(
context: context, context: context,
builder: (ctx) => Center( builder: (ctx) => Center(
@ -81,259 +76,182 @@ class SMSOTP {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: SizeConfig.getHeightMultiplier( height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 2,
height: dialogHeight) *
2,
), ),
Row( Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
mainAxisAlignment: Icon(
MainAxisAlignment.spaceBetween, type == AuthMethodTypes.SMS ? DoctorApp.verify_sms_1 : DoctorApp.verify_whtsapp,
children: [ size: SizeConfig.getHeightMultiplier(height: dialogHeight) * 9,
Icon( color: Color(0xFF2B353E),
type == AuthMethodTypes.SMS ),
? DoctorApp.verify_sms_1 Row(
: DoctorApp.verify_whtsapp, mainAxisAlignment: MainAxisAlignment.end,
size: SizeConfig.getHeightMultiplier( children: <Widget>[
height: dialogHeight) * IconButton(
9, icon: Icon(Icons.close),
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), iconSize: SizeConfig.getHeightMultiplier(height: dialogHeight) * 15,
Row( onPressed: () {
mainAxisAlignment: MainAxisAlignment.end, this.isClosed = true;
children: <Widget>[ Navigator.pop(context);
IconButton( this.onFailure();
icon: Icon(Icons.close), },
color: Color(0xFF2B353E),
iconSize:
SizeConfig.getHeightMultiplier(
height: dialogHeight) *
15,
onPressed: () {
this.isClosed = true;
Navigator.pop(context);
this.onFailure();
},
)
],
) )
]), ],
)
]),
SizedBox( SizedBox(
height: SizeConfig.getHeightMultiplier( height: SizeConfig.getHeightMultiplier(height: dialogHeight) * (SizeConfig.isHeightVeryShort ? 10 : 5),
height: dialogHeight) *
(SizeConfig.isHeightVeryShort ? 10 : 5),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 5, right: 5), padding: EdgeInsets.only(top: 5, right: 5),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context).verificationMessage + ' XXXXXX' + mobileNo.toString().substring(mobileNo.toString().length - 3),
.verificationMessage +
' XXXXXX' +
mobileNo.toString().substring(
mobileNo.toString().length - 3),
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
.getTextMultiplierBasedOnWidth(
width: dialogWidth) *
3.5,
//14, //14,
maxLines: 2, maxLines: 2,
)), )),
Form( Form(
key: verifyAccountForm, key: verifyAccountForm,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(top: SizeConfig.getHeightMultiplier(height: dialogHeight) * 2),
top: SizeConfig.getHeightMultiplier(
height: dialogHeight) *
2),
child: Directionality( child: Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
width: dialogInputWidth, width: dialogInputWidth,
height: height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
SizeConfig.getHeightMultiplier( margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
height: dialogHeight) *
30,
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
child: TextFormField( child: TextFormField(
textInputAction: textInputAction: TextInputAction.next,
TextInputAction.next, style: buildTextStyle(),
style: buildTextStyle(), autofocus: true,
autofocus: true, maxLength: 1,
maxLength: 1, controller: digit1,
controller: digit1, textAlign: TextAlign.center,
textAlign: TextAlign.center, keyboardType: TextInputType.number,
keyboardType: decoration: buildInputDecoration(context),
TextInputType.number, onSaved: (val) {},
decoration: // validator: validateCodeDigit,
buildInputDecoration(context), onFieldSubmitted: (_) {
onSaved: (val) {}, FocusScope.of(context).requestFocus(focusD2);
validator: validateCodeDigit, },
onFieldSubmitted: (_) { onChanged: (val) {
FocusScope.of(context) if (val.length == 1) {
.requestFocus(focusD2); FocusScope.of(context).requestFocus(focusD2);
}, verifyAccountFormValue['digit1'] = val.trim();
onChanged: (val) { checkValue();
if (val.length == 1) { }
FocusScope.of(context) },
.requestFocus(focusD2); validator: validateCodeDigit),
verifyAccountFormValue[
'digit1'] = val.trim();
checkValue();
}
},
),
), ),
Container( Container(
width: dialogInputWidth, width: dialogInputWidth,
height: height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
SizeConfig.getHeightMultiplier( margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
height: dialogHeight) *
30,
margin: EdgeInsets.symmetric(
vertical: 2, horizontal: 5),
child: TextFormField( child: TextFormField(
focusNode: focusD2, focusNode: focusD2,
textInputAction: textInputAction: TextInputAction.next,
TextInputAction.next,
maxLength: 1, maxLength: 1,
controller: digit2, controller: digit2,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: buildTextStyle(), style: buildTextStyle(),
keyboardType: keyboardType: TextInputType.number,
TextInputType.number, decoration: buildInputDecoration(context),
decoration:
buildInputDecoration(
context),
onSaved: (val) {}, onSaved: (val) {},
onFieldSubmitted: (_) { onFieldSubmitted: (_) {
FocusScope.of(context) FocusScope.of(context).requestFocus(focusD3);
.requestFocus(focusD3);
}, },
onChanged: (val) { onChanged: (val) {
if (val.length == 1) { if (val.length == 1) {
FocusScope.of(context) FocusScope.of(context).requestFocus(focusD3);
.requestFocus(focusD3); verifyAccountFormValue['digit2'] = val.trim();
verifyAccountFormValue[
'digit2'] = val.trim();
checkValue(); checkValue();
} }
}, },
validator: validateCodeDigit), validator: validateCodeDigit
// validator: validateCodeDigit
),
), ),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
vertical: 2, horizontal: 5),
width: dialogInputWidth, width: dialogInputWidth,
height: SizeConfig height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
.getHeightMultiplier(
height:
dialogHeight) *
30,
child: TextFormField( child: TextFormField(
focusNode: focusD3, focusNode: focusD3,
textInputAction: textInputAction: TextInputAction.next,
TextInputAction.next,
maxLength: 1, maxLength: 1,
controller: digit3, controller: digit3,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: buildTextStyle(), style: buildTextStyle(),
keyboardType: keyboardType: TextInputType.number,
TextInputType.number, decoration: buildInputDecoration(context),
decoration:
buildInputDecoration(
context),
onSaved: (val) {}, onSaved: (val) {},
onFieldSubmitted: (_) { onFieldSubmitted: (_) {
FocusScope.of(context) FocusScope.of(context).requestFocus(focusD4);
.requestFocus(focusD4);
}, },
onChanged: (val) { onChanged: (val) {
if (val.length == 1) { if (val.length == 1) {
FocusScope.of(context) FocusScope.of(context).requestFocus(focusD4);
.requestFocus( verifyAccountFormValue['digit3'] = val.trim();
focusD4);
verifyAccountFormValue[
'digit3'] =
val.trim();
checkValue(); checkValue();
} }
}, },
validator: validator: validateCodeDigit
validateCodeDigit)),
// validator: validateCodeDigit
)),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(vertical: 2, horizontal: 5),
vertical: 2, horizontal: 5), width: dialogInputWidth,
width: dialogInputWidth, height: SizeConfig.getHeightMultiplier(height: dialogHeight) * 30,
height: SizeConfig child: TextFormField(
.getHeightMultiplier( focusNode: focusD4,
height: maxLength: 1,
dialogHeight) * textAlign: TextAlign.center,
30, style: buildTextStyle(),
child: TextFormField( controller: digit4,
focusNode: focusD4, keyboardType: TextInputType.number,
maxLength: 1, decoration: buildInputDecoration(context),
textAlign: TextAlign.center, onFieldSubmitted: (_) {
style: buildTextStyle(), FocusScope.of(context).requestFocus(focusD4);
controller: digit4, },
keyboardType: onChanged: (val) {
TextInputType.number, if (val.length == 1) {
decoration: verifyAccountFormValue['digit4'] = val.trim();
buildInputDecoration( checkValue();
context), }
onFieldSubmitted: (_) { },
FocusScope.of(context) validator: validateCodeDigit),
.requestFocus(focusD4); ),
},
onChanged: (val) {
if (val.length == 1) {
verifyAccountFormValue[
'digit4'] =
val.trim();
checkValue();
}
},
validator:
validateCodeDigit)),
], ],
)), )),
), ),
), ),
Column( Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
mainAxisAlignment: MainAxisAlignment.start, AppText(
crossAxisAlignment: CrossAxisAlignment.start, TranslationBase.of(context).validationMessage + ' ',
children: [ textAlign: TextAlign.start,
AppText( fontWeight: FontWeight.w700,
TranslationBase.of(context) letterSpacing: -0.48,
.validationMessage + color: Color(0xFF2B353E),
' ', fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
textAlign: TextAlign.start, ),
fontWeight: FontWeight.w700, AppText(
letterSpacing: -0.48, displayTime,
color: Color(0xFF2B353E), color: Colors.red,
fontSize: SizeConfig textAlign: TextAlign.start,
.getTextMultiplierBasedOnWidth( fontWeight: FontWeight.bold,
width: dialogWidth) * fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
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( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), 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 // ignore: missing_return
String validateCodeDigit(value) { String? validateCodeDigit(value) {
if (value.isEmpty) { if (value.isEmpty) {
return ' '; return '';
} else if (value.length == 3) { } else if (value.length == 3) {
print(value); print(value);
} }
return ""; return null;
} }
checkValue() async { checkValue() async {
if (verifyAccountForm.currentState!.validate()) { if (verifyAccountForm.currentState!.validate()) {
onSuccess(digit1.text.toString() + // if (digit1.text.isNotEmpty && digit2.text.isNotEmpty && digit3.text.isNotEmpty && digit4.text.isNotEmpty) {
digit2.text.toString() + onSuccess(digit1.text.toString() + digit2.text.toString() + digit3.text.toString() + digit4.text.toString());
digit3.text.toString() +
digit4.text.toString());
this.isClosed = true; this.isClosed = true;
} }
} }
getSecondsAsDigitalClock(int inputSeconds) { getSecondsAsDigitalClock(int inputSeconds) {
var sec_num = var sec_num = int.parse(inputSeconds.toString()); // don't forget the second param
int.parse(inputSeconds.toString()); // don't forget the second param
var hours = (sec_num / 3600).floor(); var hours = (sec_num / 3600).floor();
var minutes = ((sec_num - hours * 3600) / 60).floor(); var minutes = ((sec_num - hours * 3600) / 60).floor();
var seconds = sec_num - hours * 3600 - minutes * 60; var seconds = sec_num - hours * 3600 - minutes * 60;
var minutesString = ""; var minutesString = "";
var secondsString = ""; var secondsString = "";
minutesString = minutesString = minutes < 10 ? "0" + minutes.toString() : minutes.toString();
minutes < 10 ? "0" + minutes.toString() : minutes.toString(); secondsString = seconds < 10 ? "0" + seconds.toString() : seconds.toString();
secondsString =
seconds < 10 ? "0" + seconds.toString() : seconds.toString();
return minutesString + ":" + secondsString; 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'; import 'package:flutter/material.dart';
class GaugeChart extends StatelessWidget { class GaugeChart extends StatelessWidget {
final List<charts.Series> seriesList; final List<Series<dynamic, String>> seriesList;
final bool animate; final bool animate;
GaugeChart(this.seriesList, {this.animate = false}); GaugeChart(this.seriesList, {this.animate = false});
@ -18,24 +18,23 @@ class GaugeChart extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new charts.PieChart(seriesList, return PieChart<String>(
animate: animate, seriesList, animate: animate, defaultRenderer: ArcRendererConfig(arcRendererDecorators: [ArcLabelDecorator(labelPosition: ArcLabelPosition.auto)]),
defaultRenderer: new charts.ArcRendererConfig(arcWidth: 10)); //ArcRendererConfig(arcWidth: 10),
);
//); //);
} }
static List<charts.Series<GaugeSegment, String>> _createSampleData() { static List<Series<GaugeSegment, String>> _createSampleData() {
final data = [ final data = [
new GaugeSegment('Low', 75, charts.MaterialPalette.blue.shadeDefault), GaugeSegment('Low', 75, MaterialPalette.blue.shadeDefault),
new GaugeSegment( GaugeSegment('Acceptable', 100, MaterialPalette.blue.shadeDefault),
'Acceptable', 100, charts.MaterialPalette.blue.shadeDefault), GaugeSegment('High', 50, MaterialPalette.blue.shadeDefault),
new GaugeSegment('High', 50, charts.MaterialPalette.blue.shadeDefault), GaugeSegment('Highly Unusual', 55, MaterialPalette.blue.shadeDefault),
new GaugeSegment(
'Highly Unusual', 55, charts.MaterialPalette.blue.shadeDefault),
]; ];
return [ return [
new charts.Series<GaugeSegment, String>( Series<GaugeSegment, String>(
id: 'Segments', id: 'Segments',
domainFn: (GaugeSegment segment, _) => segment.segment, domainFn: (GaugeSegment segment, _) => segment.segment,
measureFn: (GaugeSegment segment, _) => segment.size, measureFn: (GaugeSegment segment, _) => segment.size,

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

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

@ -1,11 +1,11 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_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/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/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/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/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -14,7 +14,7 @@ import 'package:url_launcher/url_launcher.dart';
import '../large_avatar.dart'; import '../large_avatar.dart';
import 'header_row.dart'; import 'header_row.dart';
class PatientProfileAppBar extends StatelessWidget { class PatientProfileAppBar extends StatelessWidget implements PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final double height; final double height;
final bool isInpatient; final bool isInpatient;
@ -54,7 +54,7 @@ class PatientProfileAppBar extends StatelessWidget {
this.visitDate = '', this.visitDate = '',
this.isAppointmentHeader = false, this.isAppointmentHeader = false,
this.isFromLabResult = false, this.isFromLabResult = false,
this.onPressed}); this.onPressed});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -73,17 +73,14 @@ class PatientProfileAppBar extends StatelessWidget {
right: 5, right: 5,
bottom: 5, bottom: 5,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
color: Colors.white,
border: Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: SizeConfig.isHeightVeryShort ? 30 : 50), margin: EdgeInsets.only(top: SizeConfig.isHeightVeryShort ? 30 : 50),
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
child: Row(children: [ child: Row(children: [
IconButton( IconButton(
icon: Icon(Icons.arrow_back_ios), icon: Icon(Icons.arrow_back_ios),
@ -96,11 +93,8 @@ class PatientProfileAppBar extends StatelessWidget {
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null patient.firstName != null
? (Utils.capitalize(patient.firstName) + ? (Utils.capitalize(patient.firstName) + " " + Utils.capitalize(patient.lastName))
" " + : Utils.capitalize(patient.fullName ?? patient.patientDetails!.fullName),
Utils.capitalize(patient.lastName))
: Utils.capitalize(patient.fullName ??
patient.patientDetails!.fullName),
fontSize: SizeConfig.textMultiplier! * 1.8, fontSize: SizeConfig.textMultiplier! * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -133,15 +127,12 @@ class PatientProfileAppBar extends StatelessWidget {
), ),
Row(children: [ Row(children: [
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
left: SizeConfig.isHeightVeryShort ? 0 : 12.0),
child: Container( child: Container(
width: SizeConfig.getTextMultiplierBasedOnWidth() * 20, width: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
height: SizeConfig.getTextMultiplierBasedOnWidth() * 20, height: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
child: Image.asset( child: Image.asset(
gender == 1 gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -164,29 +155,18 @@ class PatientProfileAppBar extends StatelessWidget {
color: AppGlobal.appGreenColor, color: AppGlobal.appGreenColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
.getTextMultiplierBasedOnWidth() *
3.5,
) )
: AppText( : AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context).notArrived,
color: Colors.red[800]!, color: Colors.red[800]!,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
.getTextMultiplierBasedOnWidth() *
3.5,
), ),
patient.startTime != null patient.startTime != null
? AppText( ? AppText(patient.startTime != null ? patient.startTime! : '',
patient.startTime != null fontWeight: FontWeight.w700, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, color: Color(0xFF2E303A))
? patient.startTime!
: '',
fontWeight: FontWeight.w700,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
color: Color(0xFF2E303A))
: SizedBox() : SizedBox()
], ],
)) ))
@ -199,9 +179,7 @@ class PatientProfileAppBar extends StatelessWidget {
children: [ children: [
AppText( AppText(
TranslationBase.of(context).fileNumber, TranslationBase.of(context).fileNumber,
fontSize: fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
SizeConfig.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF575757), color: Color(0xFF575757),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
@ -210,9 +188,7 @@ class PatientProfileAppBar extends StatelessWidget {
), ),
AppText( AppText(
patient.patientId.toString(), patient.patientId.toString(),
fontSize: fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
SizeConfig.getTextMultiplierBasedOnWidth() *
3.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
isCopyable: true, isCopyable: true,
@ -222,14 +198,9 @@ class PatientProfileAppBar extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationalityName ?? patient.nationality ?? patient.nationalityId ?? '',
patient.nationality ??
patient.nationalityId ??
'',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
SizeConfig.getTextMultiplierBasedOnWidth() *
3.5,
), ),
patient.nationalityFlagURL != null patient.nationalityFlagURL != null
? ClipRRect( ? ClipRRect(
@ -238,9 +209,7 @@ class PatientProfileAppBar extends StatelessWidget {
patient.nationalityFlagURL!, patient.nationalityFlagURL!,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: (BuildContext context, errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
Object exception,
StackTrace? stackTrace) {
return Text('No Image'); 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)}", "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails!.dateofBirth ?? "" : patient.dateofBirth ?? "", context, isServerFormat: !isFromLiveCare)}",
), ),
if (patient.appointmentDate != null && if (patient.appointmentDate != null && patient.appointmentDate!.isNotEmpty && !isFromLabResult)
patient.appointmentDate!.isNotEmpty &&
!isFromLabResult)
HeaderRow( HeaderRow(
label: label: TranslationBase.of(context).appointmentDate + " : ",
TranslationBase.of(context).appointmentDate + " : ", value: AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(patient.appointmentDate!)),
value: AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
patient.appointmentDate!)),
), ),
if (isFromLabResult) if (isFromLabResult)
HeaderRow( HeaderRow(
label: "Result Date: ", label: "Result Date: ",
value: value: '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
), ),
// if(isInpatient) // if(isInpatient)
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (patient.admissionDate != null && if (patient.admissionDate != null && patient.admissionDate!.isNotEmpty)
patient.admissionDate!.isNotEmpty)
HeaderRow( HeaderRow(
label: patient.admissionDate == null label: patient.admissionDate == null ? "" : TranslationBase.of(context).admissionDate + " : ",
? "" value: patient.admissionDate == null ? "" : "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate.toString())))}",
: TranslationBase.of(context).admissionDate +
" : ",
value: patient.admissionDate == null
? ""
: "${AppDateUtils.getDayMonthYearDateFormatted((AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate.toString())))}",
), ),
if (patient.admissionDate != null) if (patient.admissionDate != null)
HeaderRow( HeaderRow(
label: "${TranslationBase.of(context).numOfDays}: ", label: "${TranslationBase.of(context).numOfDays}: ",
value: isDischargedPatient && value: isDischargedPatient && patient.dischargeDate != null
patient.dischargeDate != null
? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate!)).inDays + 1}" ? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate!)).inDays + 1}"
: "${DateTime.now().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( Container(
width: 30, width: 30,
height: 30, height: 30,
margin: EdgeInsets.only( margin: EdgeInsets.only(left: projectViewModel.isArabic ? 10 : 85, right: projectViewModel.isArabic ? 85 : 10, top: 5),
left: projectViewModel.isArabic ? 10 : 85,
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
bottom: bottom: BorderSide(color: Colors.grey[400]!, width: 2.5),
BorderSide(color: Colors.grey[400]!, width: 2.5), left: BorderSide(color: Colors.grey[400]!, width: 2.5),
left:
BorderSide(color: Colors.grey[400]!, width: 2.5),
)), )),
), ),
Expanded( Expanded(
@ -340,65 +291,50 @@ class PatientProfileAppBar extends StatelessWidget {
flex: 5, flex: 5,
child: Container( child: Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
child: Column( child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, AppText(
children: <Widget>[ Utils.convertToTitleCase('${TranslationBase.of(context).dr}$doctorName'),
AppText( color: Color(0xFF2E303A),
Utils.convertToTitleCase( fontWeight: FontWeight.w700,
'${TranslationBase.of(context).dr}$doctorName'), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A), isCopyable: true,
fontWeight: FontWeight.w700, ),
fontSize: SizeConfig if (orderNo != null && !isPrescriptions)
.getTextMultiplierBasedOnWidth() * HeaderRow(
3.5, label: 'Order No: ',
isCopyable: true, value: orderNo ?? '',
), ),
if (orderNo != null && !isPrescriptions) if (invoiceNO != null && !isPrescriptions)
HeaderRow( HeaderRow(
label: 'Order No: ', label: 'Invoice: ',
value: orderNo ?? '', value: invoiceNO ?? "",
), ),
if (invoiceNO != null && !isPrescriptions) if (branch != null)
HeaderRow( HeaderRow(
label: 'Invoice: ', label: 'Branch: ',
value: invoiceNO ?? "", value: branch ?? '',
), ),
if (branch != null) if (clinic != null)
HeaderRow( Container(
label: 'Branch: ', width: MediaQuery.of(context).size.width * 0.51,
value: branch ?? '', child: HeaderRow(label: 'Clinic: ', value: Utils.convertToTitleCase(clinic) ?? '', isExpanded: true),
), ),
if (clinic != null) if (isMedicalFile && episode != null)
Container( HeaderRow(
width: label: 'Episode: ',
MediaQuery.of(context).size.width * value: episode ?? '',
0.51, ),
child: HeaderRow( if (isMedicalFile && visitDate != null)
label: 'Clinic: ', HeaderRow(
value: Utils.convertToTitleCase( label: 'Visit Date: ',
clinic) ?? value: visitDate ?? '',
'', ),
isExpanded: true), if (!isMedicalFile)
), HeaderRow(
if (isMedicalFile && episode != null) label: !isPrescriptions ? 'Result Date:' : 'Prescriptions Date ',
HeaderRow( value: '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
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 ? 137
: SizeConfig.isHeightShort : SizeConfig.isHeightShort
? 190 ? 190
: SizeConfig.heightMultiplier! * : SizeConfig.heightMultiplier! * (SizeConfig.isWidthLarge ? 25 : 20)
(SizeConfig.isWidthLarge ? 25 : 20)
: height); : 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/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/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.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/utils/translations_delegate_base_utils.dart';
@ -15,14 +15,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
final String? arrivalType; final String? arrivalType;
final bool isInpatient; final bool isInpatient;
ProfileMedicalInfoWidget( ProfileMedicalInfoWidget({Key? key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient = false});
{Key? key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to,
this.isInpatient = false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -37,159 +30,187 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS, route: VITAL_SIGN_DETAILS,
icon: 'assets/images/svgs/profile_screen/vital signs.svg'), icon: 'assets/images/svgs/profile_screen/vital signs.svg',
onTap: () {},
),
// if (selectedPatientType != 7) // if (selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: HEALTH_SUMMARY, route: HEALTH_SUMMARY,
nameLine1: "Health", nameLine1: "Health",
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Summary", nameLine2: "Summary",
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'), icon: 'assets/images/svgs/profile_screen/health summary.svg', onTap: () {},
),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg'), icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT, route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).special, nameLine2: TranslationBase.of(context).special,
icon: 'assets/images/svgs/profile_screen/lab results.svg'), icon: 'assets/images/svgs/profile_screen/lab results.svg',
onTap: () {},
),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInPatient: isInpatient!, isInPatient: isInpatient!,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'assets/images/svgs/profile_screen/health summary.svg'), 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( 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, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: PATIENT_ECG, route: PATIENT_UCAF_REQUEST,
isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG", nameLine2: TranslationBase.of(context).ucaf,
icon: 'assets/images/svgs/profile_screen/ECG.svg'), icon: 'patient/ucaf.png',
PatientProfileButton( onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_OLD, route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).orders, isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine2: TranslationBase.of(context).prescription, nameLine1: TranslationBase.of(context).referral,
icon: 'assets/images/svgs/profile_screen/order prescription.svg'), nameLine2: TranslationBase.of(context).patient,
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) icon: 'patient/refer_patient.png',
PatientProfileButton( onTap: () {},
),
if (patient!.appointmentNo != null && patient!.appointmentNo != 0)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_PROCEDURE, route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).orders, isDisable: patient!.patientStatusType != 43 ? true : false,
nameLine2: TranslationBase.of(context).procedures, nameLine1: TranslationBase.of(context).admission,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'), nameLine2: TranslationBase.of(context).request,
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6) icon: 'patient/admission_req.png',
PatientProfileButton( onTap: () {},
),
if (isInpatient)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW, route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg'), icon: 'assets/images/svgs/profile_screen/Progress notes.svg',
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6) onTap: () {},
PatientProfileButton( ),
if (isInpatient)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ADD_SICKLEAVE, route: ORDER_NOTE,
nameLine1: TranslationBase.of(context).patientSick, nameLine1: "Order",
nameLine2: TranslationBase.of(context).leave, //"Text",
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), nameLine2: "Sheet",
if (patient!.appointmentNo != null && patient!.appointmentNo != 0) icon: 'assets/images/svgs/profile_screen/Progress notes.svg', onTap: () {},
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'),
], ],
), ),
); );

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

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

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

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

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

Loading…
Cancel
Save