fix design issues

merge-update-with-lab-changes
Mohammad Aljmma 5 years ago
parent 0b90d3c687
commit 89cfcd3cad

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -83,7 +83,7 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
), ),
Container(width: double.infinity, height: MediaQuery.of(context).size.height * 0.12), Container(width: double.infinity, height: 125),
], ],
), ),
Positioned( Positioned(
@ -93,7 +93,7 @@ class _HomePageState extends State<HomePage> {
child: (!model.isLogin && projectViewModel.user == null) child: (!model.isLogin && projectViewModel.user == null)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.17, height: 180,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -166,7 +166,7 @@ class _HomePageState extends State<HomePage> {
) )
: Container( : Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.17, height: projectViewModel.isArabic?180: 150,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -184,7 +184,7 @@ class _HomePageState extends State<HomePage> {
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
@ -289,7 +289,8 @@ class _HomePageState extends State<HomePage> {
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset( Image.asset(
'assets/images/test-weight.png', 'assets/images/test-weight.png',
width: 30, width: 30,
@ -357,7 +358,8 @@ class _HomePageState extends State<HomePage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
DashboardItem( Expanded(
child: DashboardItem(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -370,36 +372,42 @@ class _HomePageState extends State<HomePage> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,),
Container( Container(
width: 50, width: 60,
height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius: BorderRadius.circular(12)
), ),
child: Center(child: Icon(DQIcons.vital_sign_icon,size: 40,color: Theme.of(context).primaryColor,)), child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,)),
), ),
SizedBox(height: 20,),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
.vitalSigns, .vitalSigns,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.5, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.35, margin: 4,
height: 170,
imageName: 'home_healthcare_service_bg.png', imageName: 'home_healthcare_service_bg.png',
opacity: 1.0, opacity: 1.0,
), ),
DashboardItem( ),
Expanded(
child: DashboardItem(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -413,34 +421,39 @@ class _HomePageState extends State<HomePage> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,),
Container( Container(
width: 50, width: 50,
height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius: BorderRadius.circular(12)
), ),
child: Center(child: Icon(DQIcons.search_medicine_icon,size: 40,color: Theme.of(context).primaryColor,),), child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
width: 50,
height: 50,
fit: BoxFit.contain,)),
), ),
SizedBox(height: 20,),
Texts( Texts(
TranslationBase.of(context).searchMedicine, TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.5, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.35, margin: 4,
height: 170,
imageName: 'al-habib_onlne_pharmacy_bg.png', imageName: 'al-habib_onlne_pharmacy_bg.png',
), ),
DashboardItem(opacity: 1.0, ),
Expanded(
child: DashboardItem(opacity: 1.0,
onTap: (){ onTap: (){
Navigator.push( Navigator.push(
context, context,
@ -453,35 +466,37 @@ class _HomePageState extends State<HomePage> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,),
Container( Container(
// width: 50,
// height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius: BorderRadius.circular(12)
), ),
child: Center(child: Icon(DQIcons.online_payment_icon,size: 40,color: Theme.of(context).primaryColor,)), child: Center(child: Image.asset('assets/images/online_payment_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,)),
), ),
SizedBox(height: 15,),
Texts( Texts(
TranslationBase.of(context).onlinePaymentService, TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.35, margin: 4,
//color: HexColor("#747C80"), height: 170,
imageName: 'online_payments_bg.png', imageName: 'online_payments_bg.png',
), ),
),
], ],
), ),
), ),
@ -724,7 +739,7 @@ class DashboardItem extends StatelessWidget {
this.width, this.width,
this.height, this.height,
this.color, this.color,
this.opacity = 1.0,this.icon}) this.opacity = 1.0,this.icon,this.margin=0})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;
@ -734,6 +749,7 @@ class DashboardItem extends StatelessWidget {
final double height; final double height;
final Color color; final Color color;
final double opacity; final double opacity;
final double margin;
final Widget icon; final Widget icon;
@override @override
@ -766,6 +782,7 @@ class DashboardItem extends StatelessWidget {
) )
: icon, : icon,
), ),
margin: EdgeInsets.all(margin),
child: Center( child: Center(
child: child, child: child,
), ),

@ -96,7 +96,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
children: <Widget>[ children: <Widget>[
Container( Container(
width: double.infinity, width: double.infinity,
height: 30, height: 55,
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
@ -500,14 +500,14 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
if (model.user != null) if (model.user != null)
Positioned( Positioned(
top: 175, top: 185,
left: 20, left: 20,
right: 20, right: 20,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 70, height: 80,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[600], color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -519,6 +519,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
fit: BoxFit.cover)), fit: BoxFit.cover)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 8, height: 8,
@ -529,9 +530,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
model.user.lastName, model.user.lastName,
color: Colors.white, color: Colors.white,
), ),
SizedBox(
height: 8,
),
Texts( Texts(
'${model.user.patientID}', '${model.user.patientID}',
color: Colors.white, color: Colors.white,

@ -31,7 +31,7 @@ class TimeLineWidget extends StatelessWidget {
), ),
if (isUp) if (isUp)
Positioned( Positioned(
top: 20, top: 15,
child: Container( child: Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Column( child: Column(
@ -90,7 +90,7 @@ class TimeLineWidget extends StatelessWidget {
) )
else else
Positioned( Positioned(
top: 70, top: 65,
child: Container( child: Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Column( child: Column(

Loading…
Cancel
Save