Merge branch 'Amjad_search' into 'development'

Modify Patiant screen List style

See merge request Cloud_Solution/doctor_app_flutter!104
merge-requests/114/head
amjad nabil amireh 6 years ago
commit e68eca359d

@ -2,8 +2,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]"; const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
// const BASE_URL = 'https://hmgwebservices.com/Services/'; const BASE_URL = 'https://hmgwebservices.com/Services/';
const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; //const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region"; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -52,7 +52,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
final String assetName = 'assets/image.svg'; final String assetName = 'assets/image.svg';
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY']; // List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = ['Today', 'Tomorrow', 'Next Week']; List<String> _locations = ['All','Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
bool _isInit = true; bool _isInit = true;
@ -277,10 +277,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
if ((currentTime.day - checkedTime.day) <= -2) { if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week"; return "Next Week";
} else { } else {
return "Old Date"; return "All";
} }
} }
return "Old Date"; return "All";
} }
/* /*

@ -1,3 +1,7 @@
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart';
//////////////
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../config/size_config.dart'; import '../config/size_config.dart';
@ -7,17 +11,28 @@ import '../widgets/shared/profile_image_widget.dart';
import '../widgets/shared/rounded_container_widget.dart'; import '../widgets/shared/rounded_container_widget.dart';
class ProfileScreen extends StatefulWidget { class ProfileScreen extends StatefulWidget {
ProfileScreen({Key key, this.title}) : super(key: key); ProfileScreen({Key key, this.title,this.doctorProfileall}) : super(key: key);
final String title; final String title;
DoctorProfileModel doctorProfileall ;
@override @override
_ProfileScreenState createState() => _ProfileScreenState(); _ProfileScreenState createState() => _ProfileScreenState();
} }
class _ProfileScreenState extends State<ProfileScreen> { class _ProfileScreenState extends State<ProfileScreen> {
//**************************
DoctorProfileModel doctorProfile ;
//AppDrawer dr;
//******************
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Map arg=ModalRoute.of(context).settings.arguments as Map;//ModalRoute.of(context).settings.arguments;
doctorProfile = arg['doctorProfileall'];
print("******************");
//print(doctorProfile.doctorName);
print("******************");
return AppScaffold( return AppScaffold(
appBarTitle: 'Profile', appBarTitle: 'Profile',
body: ListView(padding: EdgeInsets.zero, children: <Widget>[ body: ListView(padding: EdgeInsets.zero, children: <Widget>[
@ -25,10 +40,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
height: SizeConfig.heightMultiplier * 30, height: SizeConfig.heightMultiplier * 30,
child: DrawerHeader( child: DrawerHeader(
child: ProfileImageWidget( child: ProfileImageWidget(
url: url:doctorProfile.doctorImageURL,
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
name: "Dr. Chris evans", name: doctorProfile.doctorName,//"Dr. Chris evans",
des: "Director of medical records", des: doctorProfile.clinicDescription//"Director of medical records",
), ),
), ),
), ),
@ -36,28 +51,30 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
DrawerItem( DrawerItem(
"Gender", "Gender"
,
Icons.person_pin, Icons.person_pin,
color: Colors.black, color: Colors.black,
subTitle: "Male", subTitle: doctorProfile.genderDescription//"Male"
,
), ),
DrawerItem( DrawerItem(
"Clinic", "Clinic",
Icons.build, Icons.build,
color: Colors.black, color: Colors.black,
subTitle: "Neurology Clinic", subTitle: doctorProfile.clinicDescription//"Neurology Clinic",
), ),
DrawerItem( DrawerItem(
"Hospital", "Hospital",
Icons.local_hospital, Icons.local_hospital,
color: Colors.black, color: Colors.black,
subTitle: "Al-Takkassussi", subTitle: doctorProfile.projectName,//"Al-Takkassussi",
), ),
DrawerItem( DrawerItem(
"Speciality", "Speciality",
Icons.crop_square, Icons.crop_square,
color: Colors.black, color: Colors.black,
subTitle: "being great", subTitle: doctorProfile.doctorRate==0 ?"being bad":"being great",
), ),
], ],
), ),

@ -81,7 +81,11 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
onTap: () { onTap: () {
Navigator.of(context).pushNamed(PROFILE); //Navigator.of(context).pushNamed(PROFILE);
Navigator.of(context).pushNamed(PROFILE, arguments: {'title':doctorProfile.doctorName,
"doctorProfileall": doctorProfile
});
}, },
), ),
), ),

Loading…
Cancel
Save