diff --git a/lib/routes.dart b/lib/routes.dart index 2f589830..b0173483 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,4 +1,6 @@ +import 'package:doctor_app_flutter/screens/patients/patient_profile_screen.dart'; + import './screens/QR_reader_screen.dart'; import './screens/auth/change_password_screen.dart'; import './screens/auth/login_screen.dart'; @@ -13,7 +15,7 @@ import './screens/patients/patient_search_screen.dart'; import './screens/patients/patients_screen.dart'; import './screens/settings/settings_screen.dart'; -const String INIT_ROUTE = LOGIN; +const String INIT_ROUTE = PATIENTS; const String HOME = '/'; const String LOGIN = 'login'; const String CHANGE_PASSWORD = 'change-password'; @@ -23,15 +25,15 @@ const String MY_SCHEDULE = 'my-schedule'; const String QR_READER = 'qr-reader'; const String PATIENT_SEARCH = 'patients/patient-search'; const String PATIENTS = 'patients/patients'; +const String PATIENTS_PROFILE = 'patients/patients-profile'; const String BLOOD_BANK = 'blood-bank'; const String DOCTOR_REPLY = 'doctor-reply'; const String MEDICINE_SEARCH = 'medicine-search'; const String SETTINGS = 'settings'; -const LOADER ='loader'; var routes = { HOME: (_) => DashboardScreen(), - INIT_ROUTE: (_) => Loginsreen(), + LOGIN: (_) => Loginsreen(), MY_SCHEDULE: (_) => MyScheduleScreen(), PATIENT_SEARCH: (_) => PatientSearchScreen(), PATIENTS: (_) => PatientsScreen(), @@ -43,4 +45,5 @@ var routes = { CHANGE_PASSWORD: (_) => ChangePasswordScreen(), VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFICATION_METHODS:(_)=> VerificationMethodsScreen(), + PATIENTS_PROFILE:(_)=> PatientProfile() }; diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 7fbe385d..7a7baacf 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -1,9 +1,11 @@ +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; class QrReaderScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: Text('QR Reader'),), + return AppScaffold( + appBarTitle: "QR Reader", + body: Container(), ); } } \ No newline at end of file diff --git a/lib/screens/patients/patient_profile_screen.dart b/lib/screens/patients/patient_profile_screen.dart new file mode 100644 index 00000000..f86d0549 --- /dev/null +++ b/lib/screens/patients/patient_profile_screen.dart @@ -0,0 +1,16 @@ +import 'package:doctor_app_flutter/widgets/patients/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); + + @override + Widget build(BuildContext context) { + return AppScaffold( + // child: child, + appBarTitle: 'Patient Profile', + body: PatientProfileWidget(), + ); + } +} diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 68422e81..f4b8516f 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; @@ -16,13 +17,16 @@ class PatientsScreen extends StatelessWidget { body: Container( child: Column( children: litems.map((item) { - return CardWithBgWidget( - line1Text: 'Fahad AlSlehm - 324599', - line2Text: '12/04/2020 - 02:00 PM', - // line3Text: '', - - heightPercentage: 0.15, - widthPercentage: 0.80); + return InkWell( + child: CardWithBgWidget( + line1Text: 'Fahad AlSlehm - 324599', + line2Text: '12/04/2020 - 02:00 PM', + heightPercentage: 0.15, + widthPercentage: 0.80), + onTap: (){ + Navigator.of(context).pushNamed(PATIENTS_PROFILE); + }, + ); }).toList(), ), ), diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart index d276b4ad..ccb9b588 100644 --- a/lib/screens/settings/settings_screen.dart +++ b/lib/screens/settings/settings_screen.dart @@ -1,9 +1,11 @@ +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; class SettingsScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - + return AppScaffold( + appBarTitle: "SETTINS", + body: Container(), ); } } \ No newline at end of file diff --git a/lib/widgets/patients/patinet_profile_widget.dart b/lib/widgets/patients/patinet_profile_widget.dart new file mode 100644 index 00000000..7830afc5 --- /dev/null +++ b/lib/widgets/patients/patinet_profile_widget.dart @@ -0,0 +1,9 @@ +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/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index ea6ac000..e6a0b5fd 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -1,8 +1,9 @@ -import 'package:doctor_app_flutter/config/size_config.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:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; +import '../../config/size_config.dart'; +import '../../widgets/shared/drawer_item_widget.dart'; +import '../../widgets/shared/rounded_container_widget.dart'; import 'app_texts_widget.dart'; // OWNER : Ibrahim albitar @@ -21,9 +22,7 @@ class _AppDrawerState extends State { child: Container( margin: EdgeInsets.only(top: SizeConfig.heightMultiplier * 9), child: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ + child: ListView(padding: EdgeInsets.zero, children: [ Container( height: SizeConfig.heightMultiplier * 30, child: DrawerHeader( @@ -50,12 +49,21 @@ class _AppDrawerState extends State { ), ), ), - DrawerItem("My Schedule", Icons.table_chart), - DrawerItem("Settings", Icons.settings), - DrawerItem("QR Reader", Icons.search), - ] - ) - ), + InkWell( + child: DrawerItem("My Schedule", Icons.table_chart), + onTap: () { + Navigator.of(context).pushNamed(MY_SCHEDULE); + }, + ), + InkWell(child: DrawerItem("Settings", Icons.settings), onTap: (){ + Navigator.of(context).pushNamed(SETTINGS); + + },), + InkWell(child: DrawerItem("QR Reader", Icons.search),onTap:(){ + Navigator.of(context).pushNamed(QR_READER); + + } ,), + ])), ), width: SizeConfig.realScreenWidth * 0.55, margin: 0,