Merge branch 'mohammad' into 'master'

Mohammad

See merge request Cloud_Solution/doctor_app_flutter!65
merge-requests/66/merge
Mohammad Aljammal 6 years ago
commit 8f56c5104a

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -39,8 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.doctor_app_flutter"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 18
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -5,6 +5,8 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="doctor_app_flutter"

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -43,5 +43,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
</dict>
</plist>

@ -3,5 +3,13 @@ const Map<String, Map<String, String>> localizedValues = {
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
'lanEnglish': {'en': 'English', 'ar': 'English'},
'lanArabic': {'en': 'العربية', 'ar': 'العربية'}
'lanArabic': {'en': 'العربية', 'ar': 'العربية'},
'doctorReply':{'en': 'Doctor Reply', 'ar': 'رد الطبيب'},
'time' :{'en': 'Time','ar':'الوقت'},
'fileNo' :{'en':'File No', 'ar':'رقم الملف'},
'mobileNo' :{'en':'Mobile No', 'ar':'رقم الموبايل'},
'messagesScreenToolbarTitle' : {'en': 'Messages','ar': 'الرسائل' },
'mySchedule' : {'en': 'My Schedule', 'ar' : 'جدولي'},
'errorNoSchedule' :{'en': 'You don\'t have any Schedule' , 'ar': 'ليس لديك أي جدول زمني'},
};

@ -89,7 +89,7 @@ class PatiantInformtion {
this.nursingStationName,
this.appointmentDate,
this.startTime,
});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
@ -125,7 +125,7 @@ class PatiantInformtion {
age: json["Age"],
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"],
appointmentDate: json["AppointmentDate"]?? '',
startTime: json["StartTime"],
);

@ -144,6 +144,31 @@ class PatientModel {
LastName: json["LasttName"],
);
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.ProjectID;
data['ClinicID'] = this.ClinicID;
data['DoctorID'] = this.DoctorID;
data['PatientID'] = this.PatientID;
data['FirstName'] = this.FirstName;
data['MiddleName'] = this.MiddleName;
data['LastName'] = this.LastName;
data['PatientMobileNumber'] = this.PatientMobileNumber;
data['PatientIdentificationID'] = this.PatientIdentificationID;
data['PatientID'] = this.PatientID;
data['From'] = this.From;
data['To'] = this.To;
data['LanguageID'] = this.LanguageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.IPAdress;
data['VersionID'] = this.VersionID;
data['Channel'] = this.Channel;
data['TokenID'] = this.TokenID;
data['SessionID'] = this.SessionID;
data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp;
data['PatientOutSA'] = this.PatientOutSA;
return data;
}
}
//***************************

@ -1,6 +1,8 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/request_doctor_reply.dart';
import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
@ -26,6 +28,12 @@ class DoctorReplyProvider with ChangeNotifier {
getDoctorSchedule() async {
const url = BASE_URL + 'DoctorApplication.svc/REST/GtMyPatientsQuestions';
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
_requestSchedule.doctorID = doctorProfile.doctorID;
_requestSchedule.projectID = doctorProfile.projectID;
_requestSchedule.tokenID = token;
try {
if (await Helpers.checkConnection()) {
final response = await client.post(url,
@ -45,7 +53,8 @@ class DoctorReplyProvider with ChangeNotifier {
isLoading = false;
} else {
isError = true;
error = parsed['ErrorMessage'] ?? parsed['ErrorEndUserMessage'];
isLoading = false;
error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'] ;
}
}
} else {

@ -1,6 +1,8 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
@ -11,14 +13,14 @@ import '../models/list_doctor_working_hours_table_model.dart';
import '../models/request_schedule.dart';
class ScheduleProvider with ChangeNotifier {
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
Client client = HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
List<ListDoctorWorkingHoursTable> listDoctorWorkingHoursTable = [];
bool isLoading = true;
bool isError = false;
String error = '';
RequestSchedule requestSchedule = RequestSchedule(15, 1, 70907, 7, 2, '2020-04-22T11:25:57.640Z', '11.11.11.11', 1.2, 9, '2lMDFT8U+Uy5jxRzCO8n2w==', 'vV6tg9yyVJ222', true, false, 1);
RequestSchedule requestSchedule = RequestSchedule(15, 1, 1485, 7, 2, '2020-04-22T11:25:57.640Z', '11.11.11.11', 1.2, 9, '2lMDFT8U+Uy5jxRzCO8n2w==', 'vV6tg9yyVJ222', true, false, 1);
ScheduleProvider() {
getDoctorSchedule();
@ -26,6 +28,13 @@ class ScheduleProvider with ChangeNotifier {
getDoctorSchedule() async {
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
requestSchedule.doctorID = doctorProfile.doctorID;
requestSchedule.projectID = doctorProfile.projectID;
requestSchedule.clinicID = doctorProfile.clinicID;
requestSchedule.tokenID = token;
try {
if (await Helpers.checkConnection()) {

@ -1,11 +1,205 @@
import 'package:barcode_scan/platform_wrapper.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.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/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class QrReaderScreen extends StatelessWidget {
import 'package:provider/provider.dart';
import '../routes.dart';
class QrReaderScreen extends StatefulWidget {
@override
_QrReaderScreenState createState() => _QrReaderScreenState();
}
class _QrReaderScreenState extends State<QrReaderScreen> {
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
bool isLoading = false;
bool isError = false;
PatientModel patient = PatientModel(
ProjectID: 15,
ClinicID: 0,
DoctorID: 1485,
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: 0,
From: "0",
To: "0",
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
Channel: 9,
TokenID: "@dm!n",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
List<PatiantInformtion> patientList = [];
String error = '';
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "QR Reader",
body: Container(),
body: Center(
child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7),
child: FractionallySizedBox(
widthFactor: 0.9,
child: ListView(
children: [
AppText(
'Start Scanning',
fontSize: 18,
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
),
SizedBox(
height: 7,
),
AppText(
'scan Qr code to retrieve patient profile',
fontSize: 14,
fontWeight: FontWeight.w400,
textAlign: TextAlign.center
),
SizedBox(
height: 15,
),
Container(
height: 150,
child: Image.asset('assets/images/qr_code.png'),
),
SizedBox(
height: 35,
),
Button(
onTap: () {
_scanQrAndGetPatient(context);
},
title: 'Scan Qr',
loading: isLoading,
icon: Image.asset('assets/images/qr_code_white.png'),
),
isError ? Container(
margin: EdgeInsets.only(top: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context).errorColor.withOpacity(0.06),
),
padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
child: Row(
children: <Widget>[
Expanded(child: AppText(error ?? "Something went wrong.", color: Theme.of(context).errorColor)),
],
),
):Container(),
Column(
children: patientList.map((item) {
return InkWell(
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": item,
});
},
child: AnimatedContainer(
duration: Duration(milliseconds: 200),
child: CardWithBgWidget(
widget: Container(
child: AppText(
'${item.firstName} ${item.lastName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
),
),
);
}).toList()
),
],
),
),
),
),
);
}
}
_scanQrAndGetPatient(BuildContext context) async {
/// When give qr we will change this method to get data
/// var result = await BarcodeScanner.scan();
/// int patientID = get from qr result
var result = await BarcodeScanner.scan();
// if (result.rawContent == "") {
List<String> listOfParams = result.rawContent.split(',');
String patientType = "1";
setState(() {
isLoading = true;
isError = false;
patientList = [];
});
String token = await sharedPref.getString(TOKEN);
patient.PatientID = 8808;
patient.TokenID = token;
Provider.of<PatientsProvider>(context, listen: false)
.getPatientList(patient, "1")
.then((response) {
if (response['MessageStatus'] == 1) {
switch (patientType) {
case "0":
if (response['List_MyOutPatient'] != null) {
setState(() {
patientList = ModelResponse
.fromJson(response['List_MyOutPatient'])
.list;
isLoading = false;
});
} else {
setState(() {
isError = true;
error = 'No patient';
isLoading = false;
});
}
break;
case "1":
if (response['List_MyInPatient'] != null) {
setState(() {
patientList = ModelResponse.fromJson(response['List_MyInPatient']).list;
isLoading = false;
error = "";
});
} else {
setState(() {
error = 'No patient';
isError = true;
isLoading = false;
});
break;
}
}
} else {
setState(() {
error = response['ErrorEndUserMessage'] ?? response['ErrorMessage'] ;
isLoading = false;
isError = true;
});
}
});
}
// }
}

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/card_with_bg_widget.dart';
@ -24,7 +25,7 @@ class DoctorReplyScreen extends StatelessWidget {
Widget build(BuildContext context) {
_doctorReplyProvider = Provider.of(context);
return AppScaffold(
appBarTitle: 'Doctor Reply',
appBarTitle: TranslationBase.of(context).doctorReply,
showAppDrawer: false,
body:_doctorReplyProvider.isLoading? DrAppCircularProgressIndeicator():
_doctorReplyProvider.isError? Center(
@ -62,7 +63,7 @@ class DoctorReplyScreen extends StatelessWidget {
Row(
children: [
AppText(
'Time',
TranslationBase.of(context).time,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(
@ -80,7 +81,7 @@ class DoctorReplyScreen extends StatelessWidget {
Row(
children: [
AppText(
'File No',
TranslationBase.of(context).fileNo,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(
@ -98,7 +99,7 @@ class DoctorReplyScreen extends StatelessWidget {
Row(
children: [
AppText(
'Mobile No',
TranslationBase.of(context).mobileNo,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -6,7 +7,7 @@ class MessagesScreen extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
current: 1,
appBarTitle: 'Messages',
appBarTitle: TranslationBase.of(context).messagesScreenToolbarTitle,
body: Center(
child: Text('Messages heeer'),
),

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/providers/schedule_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/material.dart';
@ -18,7 +19,7 @@ class MyScheduleScreen extends StatelessWidget {
// pageOnly: false,
showBottomBar: false,
showAppDrawer: false,
appBarTitle: 'My Schedule',
appBarTitle: TranslationBase.of(context).mySchedule,
body: scheduleProvider.isLoading
? DrAppCircularProgressIndeicator()
: scheduleProvider.isError
@ -31,7 +32,7 @@ class MyScheduleScreen extends StatelessWidget {
: scheduleProvider.listDoctorWorkingHoursTable.length == 0
? Center(
child: AppText(
'You don\'t have any Schedule',
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
@ -48,7 +49,7 @@ class MyScheduleScreen extends StatelessWidget {
SizedBox(
height: 20,
),
AppText('My Schedule',
AppText(TranslationBase.of(context).mySchedule,
fontSize:
2.5 * SizeConfig.textMultiplier),
scheduleListByDate(),

@ -65,8 +65,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if (_formKey.currentState.validate()) {
_formKey.currentState.save();
//*********************************** */
sharedPref.setString(TOKEN, '@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN);
@ -83,7 +82,6 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
"selectedType": _selectedType
});
} else {
// If all data are not valid then start auto validation.
setState(() {
_autoValidate = true;
});
@ -237,9 +235,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
_patientSearchFormValues.setLastName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
SizedBox(
height: 10,
@ -269,7 +265,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
),
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Patiant ID',
hintText: 'Patient ID',
//
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
@ -288,7 +284,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
),
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Patiant File',
hintText: 'Patient File',
// validator: (value) {
// return TextValidator().validateIdNumber(value);
// },

@ -17,14 +17,11 @@ 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/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
//*************
import '../../config/size_config.dart';
import 'package:hexcolor/hexcolor.dart';
//********
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
@ -37,15 +34,16 @@ class PatientsScreen extends StatefulWidget {
class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
// final List parsed;
List parsed;
//**********
List date;
List unfilterDate;
//***********
List<PatiantInformtion> responseModelList;
List<PatiantInformtion> responseModelList2;
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = ['Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0;
@ -53,12 +51,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
bool _isInit = true;
String patientType;
String patientTypetitle;
var _isLoading = true;
var _isLoading = false;
bool _isError = true;
String error = "";
var _hasError;
//*******Amjad add to search box******
final _controller = TextEditingController();
//**************
PatientModel patient;
PatientsProvider patientsProv;
@ -68,8 +67,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
patient = routeArgs['patientSearchForm'];
print(patient.TokenID + "EEEEEE");
patientType = routeArgs['selectedType'];
patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
@ -77,26 +74,31 @@ class _PatientsScreenState extends State<PatientsScreen> {
if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
setState(() {
_isLoading = true;
_isError = false;
error = "";
});
patientsProv.getPatientList(patient, patientType).then((res) {
setState(() {
int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]];
parsed = litems;
responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList;
//********************
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
if (res['MessageStatus'] == 1) {
int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]];
parsed = litems;
responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList;
_isError = false;
} else {
_isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'] ;
}
});
print(res);
}).catchError((error) {
// patientsProv.isLoading=false;
// patientsProv.isError=true;
print("====================error================");
print(error);
setState(() {
_isError = true;
this.error = helpers.generateContactAdminMsg(error);
});
});
}
@ -106,7 +108,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
/*
*@author: Amjad Amireh
*@author: Amjad Amireh
*@Date:2/5/2020
*@param:
*@return:PatientsScreen Search textbox filter
@ -139,9 +141,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
}
//***********DateFormat**************
/*
*@author: Amjad Amireh
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date with time
@ -177,10 +178,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
/*
*@author: Amjad Amireh
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date
*@return:Convert time from Milesecond to date
*@desc:
*/
@ -202,7 +203,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
return newDate.toString();
}
convertDateFormat2(String str) {
convertDateFormat2(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
@ -220,6 +222,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
return newDate.toString();
}
filterBooking(String str) {
this.responseModelList = this.responseModelList2;
@ -273,29 +276,23 @@ class _PatientsScreenState extends State<PatientsScreen> {
return "Old Date";
}
//*************************
@override
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold(
appBarTitle: patientTypetitle,
//***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: patientsProv.isLoading
? DrAppCircularProgressIndeicator()
: patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error)
: litems == null?
// ? DrAppEmbeddedError(
// error: 'You don\'t have any ' +
// patientTypetitle +
// " patiant")
DrAppCircularProgressIndeicator()
: Container(
child:
ListView(scrollDirection: Axis.vertical, children: <
Widget>[
Container(
appBarTitle: patientTypetitle,
body: _isLoading
? DrAppCircularProgressIndeicator()
: _isError
? DrAppEmbeddedError(error: error)
: litems == null
? DrAppEmbeddedError(error: 'You don\'t have any patient')
: Container(
child: ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
Container(
child: litems == null
? Column(
children: <Widget>[
@ -333,7 +330,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
this.searchData(str);
},
decoration: buildInputDecoration(
context, 'Search patiant'),
context, 'Search Patient'),
),
),
Container(
@ -368,11 +365,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType)] ==
"List_MyOutPatient"
? AppText(
convertDateFormat2(item
.appointmentDate
.toString())+" "+"-"+" "+item.startTime
,
.appointmentDate
.toString()) +
" " +
"-" +
" " +
item.startTime,
fontSize: 2.5 *
SizeConfig
.textMultiplier)
@ -397,11 +396,14 @@ class _PatientsScreenState extends State<PatientsScreen> {
),
),
],
))
])));
),
)
],
),
),
);
}
//***********amjad update**buildInputDecoration ***to search box********
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.red),
@ -421,45 +423,46 @@ class _PatientsScreenState extends State<PatientsScreen> {
Widget _locationBar(BuildContext _context) {
return Container(
height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration(
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Text(
item,
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
onTap: () {
print(_locations.indexOf(item));
filterBooking(item.toString());
setState(() {
_activeLocation = _locations.indexOf(item);
});
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
height: 3,
width: 80,
)
: Container()
]);
}).toList(),
));
height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration(
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Text(
item,
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
onTap: () {
print(_locations.indexOf(item));
filterBooking(item.toString());
setState(() {
_activeLocation = _locations.indexOf(item);
});
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
height: 3,
width: 80,
)
: Container()
]);
}).toList(),
),
);
}
}

@ -25,6 +25,21 @@ class TranslationBase {
String get lanArabic => localizedValues['lanArabic'][locale.languageCode];
String get doctorReply => localizedValues['doctorReply'][locale.languageCode];
String get time => localizedValues['time'][locale.languageCode];
String get fileNo => localizedValues['fileNo'][locale.languageCode];
String get mobileNo => localizedValues['mobileNo'][locale.languageCode];
String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode];
String get mySchedule => localizedValues['mySchedule'][locale.languageCode];
String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -0,0 +1,146 @@
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class Button extends StatefulWidget {
Button({
Key key,
this.title: "",
this.icon,
this.onTap,
this.loading: false,
}) : super(key: key);
final String title;
final Widget icon;
final VoidCallback onTap;
final bool loading;
@override
_ButtonState createState() => _ButtonState();
}
class _ButtonState extends State<Button> with TickerProviderStateMixin {
double _buttonSize = 1.0;
AnimationController _animationController;
Animation _animation;
@override
void initState() {
_animationController = AnimationController(
vsync: this,
lowerBound: 0.7,
upperBound: 1.0,
duration: Duration(milliseconds: 120));
_animation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuad,
reverseCurve: Curves.easeOutQuad);
_animation.addListener(() {
setState(() {
_buttonSize = _animation.value;
});
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
Widget _buildIcon() {
if (widget.icon != null && (widget.title != null && widget.title != "")) {
return Container(
margin: EdgeInsets.only(right: 12.0),
height: 24.0,
child: widget.icon);
} else if (widget.icon != null) {
return Container(
height: 18.0,
width: 18.0,
child: widget.icon,
);
} else {
return Container();
}
}
@override
Widget build(BuildContext context) {
return IgnorePointer(
ignoring: widget.loading,
child: GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
},
onTapUp: (TapUpDetails tap) {
_animationController.forward();
},
onTapCancel: () {
_animationController.forward();
},
onTap: Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin:
EdgeInsets.only(bottom: widget.title.isNotEmpty ? 14.0 : 0.0),
padding: EdgeInsets.symmetric(
vertical: widget.title != null && widget.title.isNotEmpty
? 12.0
: 15.0,
horizontal: widget.title != null && widget.title.isNotEmpty
? 22.0
: 19),
decoration: BoxDecoration(
color: Hexcolor('#58434F'),
borderRadius: BorderRadius.all(Radius.circular(100.0)),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(70, 70, 70, 0.28),
spreadRadius:
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
offset: Offset(0, 7.0),
blurRadius: 24.0)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_buildIcon(),
widget.loading
? Padding(
padding: const EdgeInsets.all(2.7),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Hexcolor('#FFDDD9'),
),
),
),
)
: Padding(
padding: EdgeInsets.only(bottom: 3.0),
child: Text(widget.title,
style: TextStyle(
color: Colors.white,
fontSize: 17.0,
fontWeight: FontWeight.w700,
fontFamily: "WorkSans")),
)
],
),
),
),
),
);
}
}

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/*
*@author: Mohammad Aljammal
@ -18,6 +20,7 @@ class CardWithBgWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectProvider projectProvider = Provider.of(context);
return Container(
margin: EdgeInsets.symmetric(vertical: 10.0),
width: double.infinity,
@ -31,15 +34,26 @@ class CardWithBgWidget extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(10.0)),
child: Stack(
children: [
Positioned(
child: Container(
width: 10,
color: Hexcolor('#58434F'),
if (projectProvider.isArabic)
Positioned(
child: Container(
width: 10,
color: Hexcolor('#58434F'),
),
bottom: 0,
top: 0,
right: 0,
)
else
Positioned(
child: Container(
width: 10,
color: Hexcolor('#58434F'),
),
bottom: 0,
top: 0,
left: 0,
),
bottom: 0,
top: 0,
left: 0,
),
Container(
padding: EdgeInsets.all(15.0),
margin: EdgeInsets.only(left: 10),

@ -21,21 +21,28 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.4.1"
barcode_scan:
dependency: "direct main"
description:
name: barcode_scan
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
bazel_worker:
dependency: transitive
description:
@ -49,7 +56,7 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "2.0.0"
build:
dependency: transitive
description:
@ -126,7 +133,21 @@ packages:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.1.3"
charts_common:
dependency: transitive
description:
name: charts_common
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
charts_flutter:
dependency: "direct main"
description:
name: charts_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
checked_yaml:
dependency: transitive
description:
@ -147,7 +168,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.14.12"
connectivity:
dependency: "direct main"
description:
@ -182,7 +203,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4"
csslib:
dependency: transitive
description:
@ -308,6 +329,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
imei_plugin:
dependency: "direct main"
description:
@ -434,6 +462,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1+1"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0+hotfix.5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
petitparser:
dependency: transitive
description:
@ -503,7 +545,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.1.3"
scratch_space:
dependency: transitive
description:
@ -571,7 +613,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
stack_trace:
dependency: transitive
description:
@ -613,7 +655,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.2.15"
timing:
dependency: transitive
description:
@ -683,7 +725,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "3.6.1"
yaml:
dependency: transitive
description:

@ -37,6 +37,12 @@ dependencies:
url_launcher: ^5.4.5
charts_flutter: ^0.9.0
# Qr code Scanner
barcode_scan: ^3.0.1
# permissions
permission_handler: ^5.0.0+hotfix.3
# The following adds the Cupertino Icons font to your application.
@ -86,6 +92,8 @@ flutter:
- assets/images/lab.png
- assets/images/note.png
- assets/images/radiology-1.png
- assets/images/qr_code.png
- assets/images/qr_code_white.png
# - images/a_dot_ham.jpeg

Loading…
Cancel
Save