You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/lib/screens/profile_screen.dart

92 lines
3.4 KiB
Dart

import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.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';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class ProfileScreen extends StatefulWidget {
ProfileScreen({Key key, this.title, this.doctorProfileall}) : super(key: key);
final String title;
DoctorProfileModel doctorProfileall;
@override
_ProfileScreenState createState() => _ProfileScreenState();
}
class _ProfileScreenState extends State<ProfileScreen> {
//**************************
DoctorProfileModel doctorProfile;
//AppDrawer dr;
//******************
@override
Widget build(BuildContext context) {
Map arg = ModalRoute.of(context).settings.arguments
as Map; //ModalRoute.of(context).settings.arguments;
doctorProfile = arg['doctorProfileall'];
print("******************");
//print(doctorProfile.doctorName);
print("******************");
return AppScaffold(
appBarTitle: TranslationBase.of(context).profile,
body: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container(
height: MediaQuery.of(context).size.height *
0.35, //SizeConfig.heightMultiplier * 35,
child: Container(
child: DrawerHeader(
child: Container(
child: ProfileImageWidget(
url: doctorProfile.doctorImageURL,
//"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
name: doctorProfile.doctorName, //"Dr. Chris evans",
des: doctorProfile
.clinicDescription //"Director of medical records",
),
),
),
),
),
RoundedContainer(
child: ListView(
children: <Widget>[
DrawerItem(
TranslationBase.of(context).gender,
icon: Icons.person_pin,
color: Colors.black,
subTitle: doctorProfile.genderDescription //"Male"
,
),
DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build,
color: Colors.black,
subTitle:
doctorProfile.clinicDescription //"Neurology Clinic",
),
DrawerItem(
TranslationBase.of(context).hospital,
icon: Icons.local_hospital,
color: Colors.black,
subTitle: doctorProfile.projectName, //"Al-Takkassussi",
),
DrawerItem(
TranslationBase.of(context).speciality,
icon: Icons.crop_square,
color: Colors.black,
subTitle: doctorProfile.doctorRate == 0
? TranslationBase.of(context).beingBad
: TranslationBase.of(context).beingGreat,
),
],
),
width: SizeConfig.screenWidth * 0.70,
height: SizeConfig.screenHeight * 0.40,
),
]));
}
}