add route for search and profile

merge-requests/18/head
unknown 6 years ago
parent 80562b66f0
commit f43ec3c39d

@ -1,4 +1,6 @@
import 'package:doctor_app_flutter/screens/profile_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
@ -13,10 +15,13 @@ import './screens/patients/patient_profile_screen.dart';
import './screens/patients/patient_search_screen.dart'; import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_screen.dart'; import './screens/patients/patients_screen.dart';
import './screens/settings/settings_screen.dart'; import './screens/settings/settings_screen.dart';
import './screens/profile_screen.dart';
const String INIT_ROUTE = LOGIN; const String INIT_ROUTE = LOGIN;
const String HOME = '/'; const String HOME = '/';
const String LOGIN = 'login'; const String LOGIN = 'login';
const String PROFILE = 'profile';
const String CHANGE_PASSWORD = 'change-password'; const String CHANGE_PASSWORD = 'change-password';
const String VERIFY_ACCOUNT = 'verify-account'; const String VERIFY_ACCOUNT = 'verify-account';
const String VERIFICATION_METHODS ='verification-methods'; const String VERIFICATION_METHODS ='verification-methods';
@ -33,6 +38,7 @@ const String SETTINGS = 'settings';
var routes = { var routes = {
HOME: (_) => DashboardScreen(), HOME: (_) => DashboardScreen(),
LOGIN: (_) => Loginsreen(), LOGIN: (_) => Loginsreen(),
PROFILE: (_) => ProfileScreen(),
MY_SCHEDULE: (_) => MyScheduleScreen(), MY_SCHEDULE: (_) => MyScheduleScreen(),
PATIENT_SEARCH: (_) => PatientSearchScreen(), PATIENT_SEARCH: (_) => PatientSearchScreen(),
PATIENTS: (_) => PatientsScreen(), PATIENTS: (_) => PatientsScreen(),

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; 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_scaffold_widget.dart';
import '../routes.dart';
import '../widgets/shared/app_texts_widget.dart'; import '../widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
@ -183,12 +184,18 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 2, flex: 2,
child: new DashboardItemIconText( child: InkWell( child: DashboardItemIconText(
DoctorApp.home_icon, DoctorApp.home_icon,
"", "",
"Search Patient", "Search Patient",
showBorder: false, showBorder: false,
backgroundColor: Colors.green[200], backgroundColor: Colors.green[200],
),
onTap: () {
Navigator.of(context).pushNamed(PATIENT_SEARCH);
},
)), )),
Expanded( Expanded(
flex: 2, flex: 2,

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/profile_screen.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
@ -25,29 +26,33 @@ class _AppDrawerState extends State<AppDrawer> {
child: ListView(padding: EdgeInsets.zero, children: <Widget>[ child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container( Container(
height: SizeConfig.heightMultiplier * 30, height: SizeConfig.heightMultiplier * 30,
child: DrawerHeader( child: InkWell(
child: Column( child: DrawerHeader(
crossAxisAlignment: CrossAxisAlignment.center, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.center,
CircleAvatar( children: <Widget>[
radius: SizeConfig.imageSizeMultiplier * 12, CircleAvatar(
backgroundImage: NetworkImage( radius: SizeConfig.imageSizeMultiplier * 12,
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png"), backgroundImage: NetworkImage(
backgroundColor: Colors.transparent, "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), Padding(
child: AppText( padding: EdgeInsets.only(top: 10),
"Dr. Chris evans", child: AppText(
fontWeight: FontWeight.bold, "Dr. Chris evans",
color: Colors.white, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 3, color: Colors.white,
)), fontSize: SizeConfig.textMultiplier * 3,
AppText("Director of medical records", )),
fontWeight: FontWeight.normal, color: Colors.white) AppText("Director of medical records",
], fontWeight: FontWeight.normal, color: Colors.white)
],
),
), ),
), onTap: () {
Navigator.of(context).pushNamed(PROFILE);
}, ),
), ),
InkWell( InkWell(
child: DrawerItem("My Schedule", Icons.table_chart), child: DrawerItem("My Schedule", Icons.table_chart),

Loading…
Cancel
Save