|
|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
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:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import 'app_texts_widget.dart';
|
|
|
|
|
|
|
|
|
|
// OWNER : Ibrahim albitar
|
|
|
|
|
// DATE : 06-04-2020
|
|
|
|
|
// DESCRIPTION : Custom App Drawer for app.
|
|
|
|
|
@ -14,40 +17,55 @@ class AppDrawer extends StatefulWidget {
|
|
|
|
|
class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
Drawer(
|
|
|
|
|
child: ListView(
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DrawerHeader(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
CircleAvatar(
|
|
|
|
|
radius: 40,
|
|
|
|
|
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: Text("Dr. Chris evans", style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold , color: Colors.white), )),
|
|
|
|
|
Text("Director of medical records", style: TextStyle(fontSize: 14, fontWeight: FontWeight.normal, color: Colors.white),)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0x58434F)
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: SizeConfig.heightMultiplier * 9),
|
|
|
|
|
child: Drawer(
|
|
|
|
|
child: ListView(
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
height: SizeConfig.heightMultiplier * 30,
|
|
|
|
|
child: DrawerHeader(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
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"),
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
|
child: AppText(
|
|
|
|
|
"Dr. Chris evans",
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
|
|
|
)),
|
|
|
|
|
AppText("Director of medical records",
|
|
|
|
|
fontWeight: FontWeight.normal, color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
DrawerItem("My Schedule", Icons.table_chart),
|
|
|
|
|
DrawerItem("Settings", Icons.settings),
|
|
|
|
|
DrawerItem("QR Reader", Icons.search),
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
DrawerItem()
|
|
|
|
|
])
|
|
|
|
|
),
|
|
|
|
|
margin: 0,
|
|
|
|
|
customCornerRaduis: true,
|
|
|
|
|
topRight: 30,
|
|
|
|
|
bottomRight: 30,
|
|
|
|
|
backgroundColor: Color(0xff58434F),
|
|
|
|
|
width: SizeConfig.realScreenWidth * 0.55,
|
|
|
|
|
margin: 0,
|
|
|
|
|
customCornerRaduis: true,
|
|
|
|
|
topRight: 30,
|
|
|
|
|
bottomRight: 30,
|
|
|
|
|
backgroundColor: Color(0xff58434F),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
drawerNavigator(context, routeName) {
|
|
|
|
|
Navigator.of(context).pushNamed(routeName);
|
|
|
|
|
}
|
|
|
|
|
|