profile screen and extentions class
parent
2cc929fa88
commit
8c83166c40
@ -0,0 +1,63 @@
|
||||
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';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
ProfileScreen({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
_ProfileScreenState createState() => _ProfileScreenState();
|
||||
}
|
||||
|
||||
class _ProfileScreenState extends State<ProfileScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle:'Profile',
|
||||
body: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,
|
||||
|
||||
fontSize: SizeConfig.textMultiplier * 3,
|
||||
)),
|
||||
AppText("Director of medical records",)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
RoundedContainer(child: ListView(children: <Widget>[
|
||||
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,
|
||||
),
|
||||
|
||||
]
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
extension Extension on Object {
|
||||
bool isNullOrEmpty() => this == null || this == '';
|
||||
|
||||
bool isNullEmptyOrFalse() => this == null || this == '' || !this;
|
||||
|
||||
bool isNullEmptyZeroOrFalse() =>
|
||||
this == null || this == '' || !this || this == 0;
|
||||
}
|
||||
Loading…
Reference in New Issue