component sizes changed

ipd-changes-for-vida-plus
tahaalam 4 days ago
parent f9584949d2
commit a1391eb458

@ -46,11 +46,11 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget implements Pre
decoration: BoxDecoration(
color: Colors.white,
),
height: height == 0
? isInpatient
? 220
: 200
: height,
// height: height == 0
// ? isInpatient
// ? 220
// : 200
// : height,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),

@ -30,224 +30,223 @@ class _AppDrawerState extends State<AppDrawer> {
Widget build(BuildContext context) {
AuthenticationViewModel authenticationViewModel = Provider.of(context);
projectsProvider = Provider.of(context);
return Container(
color: Colors.white,
child: Drawer(
child: Column(
children: <Widget>[
Expanded(
flex: 7,
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 15),
// height: SizeConfig.heightMultiplier! * 50,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
child: Image.asset(
'assets/images/rsg_logo.png',
width: MediaQuery.of(context).size.width * 0.50,
height: MediaQuery.of(context).size.height * 0.16,
return Drawer(
backgroundColor: Colors.white,
width: MediaQuery.of(context).size.width *.68,
child: Column(
children: <Widget>[
Expanded(
flex: 7,
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 15),
// height: SizeConfig.heightMultiplier! * 50,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
child: Image.asset(
'assets/images/rsg_logo.png',
width: MediaQuery.of(context).size.width * 0.50,
height: MediaQuery.of(context).size.height * 0.16,
),
margin: EdgeInsets.only(top: 10, bottom: 10),
),
Container(
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(
DoctorApp.close_1,
size: 20,
color: Color(0xff2B353E),
),
margin: EdgeInsets.only(top: 10, bottom: 10),
),
Container(
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(
DoctorApp.close_1,
size: 20,
color: Color(0xff2B353E),
margin: EdgeInsets.only(top: 20, bottom: 10),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
SizedBox(height: 5),
if (authenticationViewModel.doctorProfile != null)
InkWell(
onTap: () {
// TODO: return it back when its needed
// Navigator.of(context).pushNamed(PROFILE, arguments: {
// 'title': authProvider.doctorProfile.doctorName,
// "doctorProfileall": authProvider.doctorProfile
// });
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 8.0),
child: AppText(
TranslationBase.of(context).dr + capitalizeOnlyFirstLater(authenticationViewModel.doctorProfile!.doctorName!.replaceAll("DR.", "").toLowerCase()),
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontSize: 25.0,
letterSpacing: -1.5,
),
),
margin: EdgeInsets.only(top: 20, bottom: 10),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
SizedBox(height: 5),
if (authenticationViewModel.doctorProfile != null)
InkWell(
onTap: () {
// TODO: return it back when its needed
// Navigator.of(context).pushNamed(PROFILE, arguments: {
// 'title': authProvider.doctorProfile.doctorName,
// "doctorProfileall": authProvider.doctorProfile
// });
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 8.0),
Padding(
padding: EdgeInsets.only(top: 0),
child: AppText(
TranslationBase.of(context).dr + capitalizeOnlyFirstLater(authenticationViewModel.doctorProfile!.doctorName!.replaceAll("DR.", "").toLowerCase()),
fontWeight: FontWeight.w700,
authenticationViewModel.doctorProfile!.clinicDescription!,
fontWeight: FontWeight.w500,
color: Color(0xFF2E303A),
fontSize: 16,
fontFamily: 'Poppins',
fontSize: 25.0,
letterSpacing: -1.5,
),
),
Padding(
padding: EdgeInsets.only(top: 0),
child: AppText(
authenticationViewModel.doctorProfile!.clinicDescription!,
fontWeight: FontWeight.w500,
color: Color(0xFF2E303A),
fontSize: 16,
fontFamily: 'Poppins',
letterSpacing: -0.96,
//textAlign: TextAlign.left,
))
],
),
letterSpacing: -0.96,
//textAlign: TextAlign.left,
))
],
),
SizedBox(height: 40),
InkWell(
child: DrawerItem(
TranslationBase.of(context).applyOrRescheduleLeave,
icon: DoctorApp.reschedule__1,
),
SizedBox(height: 40),
InkWell(
child: DrawerItem(
TranslationBase.of(context).applyOrRescheduleLeave,
icon: DoctorApp.reschedule__1,
// subTitle: ,
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AddRescheduleLeaveScreen(), settings: RouteSettings(name: 'AddRescheduleLeaveScreen')
// MyReferredPatient(),
));
},
// subTitle: ,
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).doctorRota,
icon: Icons.punch_clock,
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AddRescheduleLeaveScreen(), settings: RouteSettings(name: 'AddRescheduleLeaveScreen')
// MyReferredPatient(),
));
},
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).doctorRota,
icon: Icons.punch_clock,
// subTitle: ,
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DoctorSchedulePage(), settings: RouteSettings(name: 'doctorSchedule')
// MyReferredPatient(),
));
},
// subTitle: ,
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).myQRCode,
icon: DoctorApp.qr_code_3,
// subTitle: ,
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DoctorSchedulePage(), settings: RouteSettings(name: 'doctorSchedule')
// MyReferredPatient(),
));
},
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).myQRCode,
icon: DoctorApp.qr_code_3,
// subTitle: ,
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
InkWell(
child: Container(
height: MediaQuery.of(context).size.height * 0.16,
width: MediaQuery.of(context).size.width * 0.16,
child: Image.asset('assets/images/qr_code.png'),
),
onTap: () {},
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
InkWell(
child: Container(
height: MediaQuery.of(context).size.height * 0.16,
width: MediaQuery.of(context).size.width * 0.16,
child: Image.asset('assets/images/qr_code.png'),
),
],
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
onTap: () {},
),
],
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
InkWell(
child: DrawerItem(
projectsProvider.isArabic ? TranslationBase.of(context).lanEnglish : TranslationBase.of(context).lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic ? 'assets/images/usa-flag.png' : 'assets/images/saudi-arabia-flag.png',
),
onTap: () {
if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en');
else
projectsProvider.changeLanguage('ar');
},
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
InkWell(
child: DrawerItem(
projectsProvider.isArabic ? TranslationBase.of(context).lanEnglish : TranslationBase.of(context).lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic ? 'assets/images/usa-flag.png' : 'assets/images/saudi-arabia-flag.png',
),
SizedBox(height: 10),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
icon: DoctorApp.logout_1,
),
onTap: () async {
Navigator.pop(context);
await authenticationViewModel.logout(isFromLogin: false);
locator<NavigationService>().pushNamedAndRemoveUntil(ROOT);
},
onTap: () {
if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en');
else
projectsProvider.changeLanguage('ar');
},
),
SizedBox(height: 10),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
icon: DoctorApp.logout_1,
),
],
),
onTap: () async {
Navigator.pop(context);
await authenticationViewModel.logout(isFromLogin: false);
locator<NavigationService>().pushNamedAndRemoveUntil(ROOT);
},
),
],
),
]),
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Container(
// This align moves the children to the bottom
child: Align(
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Padding(
padding: EdgeInsets.only(left: projectsProvider.isArabic ? 0 : 15.0, right: projectsProvider.isArabic ? 15.0 : 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
text: TextSpan(
text: 'Powered by',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.w600,
fontSize: 14,
fontFamily: 'Poppins',
letterSpacing: -0.56,
),
children: <TextSpan>[
TextSpan(
text: ' Cloud Solutions',
style: TextStyle(color: Color(0xFF2E303A), fontSize: 14, fontFamily: 'Poppins', letterSpacing: -0.56, fontWeight: FontWeight.w700),
)
],
),
]),
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Container(
// This align moves the children to the bottom
child: Align(
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Padding(
padding: EdgeInsets.only(left: projectsProvider.isArabic ? 0 : 15.0, right: projectsProvider.isArabic ? 15.0 : 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
text: TextSpan(
text: 'Powered by',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.w600,
fontSize: 14,
fontFamily: 'Poppins',
letterSpacing: -0.56,
),
children: <TextSpan>[
TextSpan(
text: ' Cloud Solutions',
style: TextStyle(color: Color(0xFF2E303A), fontSize: 14, fontFamily: 'Poppins', letterSpacing: -0.56, fontWeight: FontWeight.w700),
)
],
),
),
// Text("Powered by"),
Image.asset('assets/images/cs_logo_container.png', width: MediaQuery.of(context).size.width * 0.13)
],
),
),
// Text("Powered by"),
Image.asset('assets/images/cs_logo_container.png', width: MediaQuery.of(context).size.width * 0.13)
],
),
),
),
)
],
),
)
],
),
),
)
],
),
)
],
),
);
}

@ -32,7 +32,7 @@ class BottomNavigationItem extends StatelessWidget {
Widget build(BuildContext context) {
return Expanded(
child: SizedBox(
height: 70.0,
height:MediaQuery.of(context).size.height *.1,
child: Material(
type: MaterialType.transparency,
child: InkWell(
@ -57,8 +57,9 @@ class BottomNavigationItem extends StatelessWidget {
SizedBox(
height: 15,
),
Container(
child: SvgPicture.asset(
Stack(
children: [
SvgPicture.asset(
svgPath!,
width: SizeConfig.widthMultiplier! * (10),
height: SizeConfig.getHeightMultiplier(
@ -70,6 +71,29 @@ class BottomNavigationItem extends StatelessWidget {
: 7)) *
40,
),
if (currentIndex == 3 &&
dashboardViewModel!.notRepliedCount != 0)
Positioned(
top:1, right:1,
child: badge.Badge(
badgeAnimation:
badge.BadgeAnimation.fade(toAnimate: false),
position: BadgePosition.topEnd(),
badgeStyle: badge.BadgeStyle(
shape: BadgeShape.circle,
badgeColor: const Color(0xFF14384B),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
// padding: EdgeInsets.all(2.0),
child: AppText(
dashboardViewModel!.notRepliedCount.toString(),
color: Colors.white,
fontSize: 12.0),
),
),
),
]
),
SizedBox(
height: 8,
@ -86,29 +110,7 @@ class BottomNavigationItem extends StatelessWidget {
),
],
),
if (currentIndex == 3 &&
dashboardViewModel!.notRepliedCount != 0)
Positioned(
right: 18.0,
bottom: 40.0,
child: badge.Badge(
badgeAnimation:
badge.BadgeAnimation.fade(toAnimate: false),
position: BadgePosition.topEnd(),
badgeStyle: badge.BadgeStyle(
shape: BadgeShape.circle,
badgeColor: const Color(0xFF14384B),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
// padding: EdgeInsets.all(2.0),
child: AppText(
dashboardViewModel!.notRepliedCount.toString(),
color: Colors.white,
fontSize: 12.0),
),
),
),
],
),
),

Loading…
Cancel
Save