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( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: height == 0 // height: height == 0
? isInpatient // ? isInpatient
? 220 // ? 220
: 200 // : 200
: height, // : height,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 50),

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