Merge branch 'Mahmoud' into 'master'

My Changes Before Demo

See merge request Cloud_Solution/doctor_app_flutter!67
merge-requests/68/head
Mahmoud Shrouf 6 years ago
commit 0670360af8

@ -252,9 +252,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: DashboardItemIconText(
DoctorApp.home_icon,
"",
"In Patient",
"Search Medicine",
showBorder: false,
backgroundColor: Colors.blueGrey[900],
backgroundColor: Colors.teal,
),
onTap: () {
Navigator.push(

@ -36,7 +36,7 @@ class BodyMeasurementsScreen extends StatelessWidget {
barGroupingType: charts.BarGroupingType.grouped,
// behaviors: [new charts.SeriesLegend()],
// primaryMeasureAxis: ,
animationDuration: Duration(seconds: 5),
animationDuration: Duration(seconds: 1),
),
),
],

@ -182,11 +182,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
Map model = {
"LogInTokenID": _loggedUser['LogInTokenID'],
"Channel": 9,
"MobileNumber": 785228065, //_loggedUser['MobileNumber'],
"MobileNumber": _loggedUser['MobileNumber'],
"IPAdress": "11.11.11.11",
"LanguageID": 2,
"ProjectID": 15, //TODO : this should become daynamci
"ZipCode": 962, //_loggedUser['ZipCode'],
"ZipCode": _loggedUser['ZipCode'],
"UserName": _loggedUser['List_MemberInformation'][0]['MemberID'],
"OTP_SendType": oTPSendType
};

@ -28,7 +28,7 @@ class ProfileHeaderWidget extends StatelessWidget {
height: SizeConfig.heightMultiplier * 30,
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
name: patient.firstName + ' ' + patient.lastName,
des: patient.patientId.toString(),
height: SizeConfig.heightMultiplier * 17,

@ -1,13 +1,18 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../config/shared_pref_kay.dart';
import '../../config/size_config.dart';
import '../../providers/schedule_provider.dart';
import '../../routes.dart';
import '../../screens/doctor/my_schedule_screen.dart';
import '../../util/dr_app_shared_pref.dart';
import '../../widgets/shared/drawer_item_widget.dart';
import '../../widgets/shared/rounded_container_widget.dart';
import 'app_texts_widget.dart';
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
// OWNER : Ibrahim albitar
// DATE : 06-04-2020
@ -19,8 +24,30 @@ class AppDrawer extends StatefulWidget {
}
class _AppDrawerState extends State<AppDrawer> {
bool _isInit = true;
DoctorProfileModel doctorProfile;
@override
void didChangeDependencies() {
super.didChangeDependencies();
// if (_isInit) {
getDocProfile();// TODO: Refactor this code to prevent errors in the cosole.
// }
_isInit = false;
}
getDocProfile() async {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// doctorProfile = DoctorProfileModel.fromJson(profile);
setState(() {
doctorProfile = DoctorProfileModel.fromJson(profile);
});
String token = await sharedPref.getString(TOKEN);
}
@override
Widget build(BuildContext context) {
// var x = getDocProfile();
return RoundedContainer(
child: Container(
margin: EdgeInsets.only(top: SizeConfig.heightMultiplier * 9),
@ -35,19 +62,20 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
CircleAvatar(
radius: SizeConfig.imageSizeMultiplier * 12,
backgroundImage: NetworkImage(
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png"),
backgroundImage:
NetworkImage(doctorProfile.doctorImageURL),
backgroundColor: Colors.transparent,
),
Padding(
padding: EdgeInsets.only(top: 10),
child: AppText(
"Dr. Chris evans",
doctorProfile.doctorName,
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: SizeConfig.textMultiplier * 3,
fontSize: SizeConfig.textMultiplier * 2,
)),
AppText("Director of medical records",
AppText("Director of medical records",//TODO: Make The Dr Title Dynamic and check overflow issue.
fontWeight: FontWeight.normal, color: Colors.white)
],
),
@ -83,6 +111,12 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(QR_READER);
},
),
InkWell(
child: DrawerItem("lOGOUT", Icons.exit_to_app),
onTap: () {
Navigator.of(context).pushNamed(LOGIN);
},
),
])),
),
width: SizeConfig.realScreenWidth * 0.55,

@ -66,7 +66,7 @@ class AppScaffold extends StatelessWidget {
height: 50,
width: 50,
url:
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
)
],
),

Loading…
Cancel
Save