diff --git a/assets/images/heartbeat.png b/assets/images/heartbeat.png new file mode 100644 index 00000000..3a83ddee Binary files /dev/null and b/assets/images/heartbeat.png differ diff --git a/assets/images/lab.png b/assets/images/lab.png new file mode 100644 index 00000000..3f2f72c9 Binary files /dev/null and b/assets/images/lab.png differ diff --git a/assets/images/note.png b/assets/images/note.png new file mode 100644 index 00000000..86d42f9b Binary files /dev/null and b/assets/images/note.png differ diff --git a/assets/images/radiology-1.png b/assets/images/radiology-1.png new file mode 100644 index 00000000..ceb0775e Binary files /dev/null and b/assets/images/radiology-1.png differ diff --git a/lib/routes.dart b/lib/routes.dart index 1804f17d..4f52fa04 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,6 +1,4 @@ -import 'package:doctor_app_flutter/screens/profile_screen.dart'; - import './screens/QR_reader_screen.dart'; import './screens/auth/change_password_screen.dart'; import './screens/auth/login_screen.dart'; @@ -14,11 +12,11 @@ import './screens/my_schedule_screen.dart'; import './screens/patients/patient_profile_screen.dart'; import './screens/patients/patient_search_screen.dart'; import './screens/patients/patients_screen.dart'; -import './screens/settings/settings_screen.dart'; import './screens/profile_screen.dart'; +import './screens/settings/settings_screen.dart'; -const String INIT_ROUTE = LOGIN; +const String INIT_ROUTE = PATIENTS_PROFILE; const String HOME = '/'; const String LOGIN = 'login'; const String PROFILE = 'profile'; @@ -50,5 +48,5 @@ var routes = { CHANGE_PASSWORD: (_) => ChangePasswordScreen(), VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFICATION_METHODS:(_)=> VerificationMethodsScreen(), - PATIENTS_PROFILE:(_)=> PatientProfile() + PATIENTS_PROFILE:(_)=> PatientProfileScreen() }; diff --git a/lib/screens/patients/patient_profile_screen.dart b/lib/screens/patients/patient_profile_screen.dart index f86d0549..e71e5350 100644 --- a/lib/screens/patients/patient_profile_screen.dart +++ b/lib/screens/patients/patient_profile_screen.dart @@ -1,9 +1,9 @@ -import 'package:doctor_app_flutter/widgets/patients/patinet_profile_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patinet_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -class PatientProfile extends StatelessWidget { - const PatientProfile({Key key}) : super(key: key); +class PatientProfileScreen extends StatelessWidget { + const PatientProfileScreen({Key key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index b346e341..9a09424f 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -1,10 +1,11 @@ -import 'package:doctor_app_flutter/config/size_config.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/drawer_item_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; +import '../config/size_config.dart'; +import '../widgets/shared/app_scaffold_widget.dart'; +import '../widgets/shared/drawer_item_widget.dart'; +import '../widgets/shared/profile_image_widget.dart'; +import '../widgets/shared/rounded_container_widget.dart'; + class ProfileScreen extends StatefulWidget { ProfileScreen({Key key, this.title}) : super(key: key); @@ -18,46 +19,52 @@ class _ProfileScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle:'Profile', - body:ListView( - padding: EdgeInsets.zero, - children: [ + appBarTitle: 'Profile', + body: ListView(padding: EdgeInsets.zero, children: [ Container( height: SizeConfig.heightMultiplier * 30, child: DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - CircleAvatar( - radius: SizeConfig.imageSizeMultiplier * 12, - backgroundImage: NetworkImage( - "https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png"), - backgroundColor: Colors.transparent, - ), - Padding( - padding: EdgeInsets.only(top: 10), - child: AppText( - "Dr. Chris evans", - fontWeight: FontWeight.bold, - - fontSize: SizeConfig.textMultiplier * 3, - )), - AppText("Director of medical records",) - ], + child: ProfileImageWidget( + url: + "https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", + name: "Dr. Chris evans", + des: "Director of medical records", ), ), ), - RoundedContainer(child: ListView(children: [ - DrawerItem("Gender", Icons.person_pin, color: Colors.black, subTitle: "Male",), - DrawerItem("Clinic", Icons.build, color: Colors.black, subTitle: "Neurology Clinic",), - DrawerItem("Hospital", Icons.local_hospital, color: Colors.black, subTitle: "Al-Takkassussi",), - DrawerItem("Speciality", Icons.crop_square, color: Colors.black, subTitle: "being great",), - ],), - width: SizeConfig.screenWidth*0.70, - height: SizeConfig.screenHeight*0.40, + RoundedContainer( + child: ListView( + children: [ + DrawerItem( + "Gender", + Icons.person_pin, + color: Colors.black, + subTitle: "Male", + ), + DrawerItem( + "Clinic", + Icons.build, + color: Colors.black, + subTitle: "Neurology Clinic", + ), + DrawerItem( + "Hospital", + Icons.local_hospital, + color: Colors.black, + subTitle: "Al-Takkassussi", + ), + DrawerItem( + "Speciality", + Icons.crop_square, + color: Colors.black, + subTitle: "being great", + ), + ], + ), + width: SizeConfig.screenWidth * 0.70, + height: SizeConfig.screenHeight * 0.40, ), - - ] - )); + ])); } -} \ No newline at end of file +} + diff --git a/lib/widgets/patients/patinet_profile_widget.dart b/lib/widgets/patients/patinet_profile_widget.dart deleted file mode 100644 index 7830afc5..00000000 --- a/lib/widgets/patients/patinet_profile_widget.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter/material.dart'; -class PatientProfileWidget extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Container( - child: Center(child: Text('Heeeer Must be Patient Profile'),), - ); - } -} \ No newline at end of file diff --git a/lib/widgets/patients/profile/Profile_general_info_Widget.dart b/lib/widgets/patients/profile/Profile_general_info_Widget.dart new file mode 100644 index 00000000..916cd5a8 --- /dev/null +++ b/lib/widgets/patients/profile/Profile_general_info_Widget.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +import './profile_general_info_content_widget.dart'; +import '../../../config/size_config.dart'; +import '../../shared/rounded_container_widget.dart'; +class ProfileGeneralInfoWidget extends StatelessWidget { + const ProfileGeneralInfoWidget({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return RoundedContainer( + child: ListView( + children: [ + ProfileGeneralInfoContentWidget( + title: "Age", + info: '55 Yr', + ), + ProfileGeneralInfoContentWidget( + title: "Contact Number", + info: '00 966 5000000000', + ), + ProfileGeneralInfoContentWidget( + title: "Email", + info: 'Elham@yahoo.com', + ), + ], + ), + width: SizeConfig.screenWidth * 0.70, + height: SizeConfig.screenHeight * 0.25, + ); + } +} \ No newline at end of file diff --git a/lib/widgets/patients/profile/patinet_profile_widget.dart b/lib/widgets/patients/profile/patinet_profile_widget.dart new file mode 100644 index 00000000..9efb0d6a --- /dev/null +++ b/lib/widgets/patients/profile/patinet_profile_widget.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import './Profile_general_info_Widget.dart'; +import './profile_medical_info_widget.dart'; +import './profile_status_info_widget.dart'; +import '../../../config/size_config.dart'; +import '../../../widgets/shared/profile_image_widget.dart'; + +class PatientProfileWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return ListView(padding: EdgeInsets.zero, children: [ + Container( + height: SizeConfig.heightMultiplier * 30, + child: ProfileImageWidget( + url: + "http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg", + name: "Fahad AlSlehm", + des: "324599", + height: SizeConfig.heightMultiplier * 17, + width: SizeConfig.heightMultiplier * 17, + color: Hexcolor('#58434F')), + ), + ProfileGeneralInfoWidget(), + ProfileMedicalInfoWidget(), + ProfileStatusInfoWidget() + ]); + } +} + + + + + diff --git a/lib/widgets/patients/profile/profile_general_info_content_widget.dart b/lib/widgets/patients/profile/profile_general_info_content_widget.dart new file mode 100644 index 00000000..1a014422 --- /dev/null +++ b/lib/widgets/patients/profile/profile_general_info_content_widget.dart @@ -0,0 +1,36 @@ +import '../../../config/size_config.dart'; +import '../../shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +class ProfileGeneralInfoContentWidget extends StatelessWidget { + String title; + String info; + + ProfileGeneralInfoContentWidget({this.title, this.info}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + AppText( + title, + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.w700, + color: Hexcolor('#58434F'), + ), + AppText( + info, + color: Hexcolor('#707070'), + fontSize: SizeConfig.textMultiplier * 2, + ) + ], + ), + ); + } +} diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart new file mode 100644 index 00000000..ba139e85 --- /dev/null +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../../config/size_config.dart'; +import '../../shared/app_texts_widget.dart'; +import '../../shared/rounded_container_widget.dart'; + +class ProfileMedicalInfoWidget extends StatelessWidget { + const ProfileMedicalInfoWidget({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + String url = "assets/images/"; + final double contWidth = SizeConfig.screenWidth * 0.70; + final double contHeight = SizeConfig.screenHeight * 0.30; + + return RoundedContainer( + child: ListView( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Patient Medical Information ', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.w700, + color: Hexcolor('#58434F'), + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + CircleAvatarWidget( + des: 'Vital Sign', + url: url + 'heartbeat.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), + CircleAvatarWidget( + des: 'Lab Result', + url: url + 'lab.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), + CircleAvatarWidget( + des: 'Prescription', + url: url + 'note.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), + CircleAvatarWidget( + des: 'Radiology', + url: url + 'radiology-1.png', + width: (contWidth) / 3.5, + height: (contWidth) / 3.5, + ), + ], + ) + ], + ), + ), + ], + ), + width: contWidth, + height: contHeight, + ); + } +} + +class CircleAvatarWidget extends StatelessWidget { + const CircleAvatarWidget( + {Key key, + @required this.url, + @required this.des, + this.height, + this.width}) + : super(key: key); + + final String url; + final String des; + + final double height; + final double width; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + height: height, + width: width, + decoration: new BoxDecoration( + // color: Colors.green, // border color + shape: BoxShape.circle, + border: Border.all(color: Hexcolor('#B7831A'),width: 1.5)), + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier * 12, + child: Image.asset(url), + backgroundColor: Colors.transparent, + ), + ), + SizedBox( + height: 10, + ), + AppText(des) + ], + ); + } +} diff --git a/lib/widgets/patients/profile/profile_status_info_widget.dart b/lib/widgets/patients/profile/profile_status_info_widget.dart new file mode 100644 index 00000000..2c69eb03 --- /dev/null +++ b/lib/widgets/patients/profile/profile_status_info_widget.dart @@ -0,0 +1,43 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../../config/size_config.dart'; +import '../../shared/rounded_container_widget.dart'; + +class ProfileStatusInfoWidget extends StatelessWidget { + const ProfileStatusInfoWidget({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return RoundedContainer( + child: ListView( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Insurance approval', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.w700, + color: Hexcolor('#58434F'), + ), + AppText( + 'Approved', + color: Hexcolor('#707070'), + fontSize: SizeConfig.textMultiplier * 2.5, + ) + ], + ), + ), + ], + ), + width: SizeConfig.screenWidth * 0.70, + height: SizeConfig.screenHeight * 0.12, + ); + } +} diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 07c82d17..db4f1b2c 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -1,7 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../util/extenstions.dart'; // OWNER : Ibrahim albitar diff --git a/lib/widgets/shared/profile_image_widget.dart b/lib/widgets/shared/profile_image_widget.dart new file mode 100644 index 00000000..159d179b --- /dev/null +++ b/lib/widgets/shared/profile_image_widget.dart @@ -0,0 +1,50 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class ProfileImageWidget extends StatelessWidget { + String url; + String name; + String des; + double height; + double width; + Color color; + + ProfileImageWidget( + {this.url, + this.name, + this.des, + this.height, + this.width, + this.color = Colors.black}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: height, + width: width, + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier * 12, + backgroundImage: NetworkImage(url), + backgroundColor: Colors.transparent, + ), + ), + Padding( + padding: EdgeInsets.only(top: 10), + child: AppText( + name, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 4, + color: color, + )), + AppText( + des, + fontSize: SizeConfig.textMultiplier * 2.5, + ) + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 549a17d8..996ef2fc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -76,6 +76,11 @@ flutter: - assets/images/close_icon.png - assets/images/welcome_login_icon.png - assets/images/verified_icon.png + - assets/images/heartbeat.png + - assets/images/lab.png + - assets/images/note.png + - assets/images/radiology-1.png + # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see