small fixes

merge-requests/916/head
Elham Rababh 3 years ago
parent fedb4533c7
commit ecffe99f19

@ -5,29 +5,27 @@ class HomePageCard extends StatelessWidget {
const HomePageCard(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.child,
this.onTap,
Key key,
this.color,
this.opacity = 0.4,
this.margin})
this.margin, this.width})
: super(key: key);
final bool hasBorder;
final String imageName;
final Widget child;
final Function onTap;
final GestureTapCallback onTap;
final Color color;
final double opacity;
final double width;
final EdgeInsets margin;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
width: 120,
height: MediaQuery.of(context).orientation == Orientation.portrait
? 100
: 200,
width: width,
margin: this.margin,
decoration: BoxDecoration(
color: !hasBorder
@ -43,8 +41,7 @@ class HomePageCard extends StatelessWidget {
? DecorationImage(
image: AssetImage('assets/images/dashboard/$imageName'),
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn),
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn),
)
: null,
),

@ -10,25 +10,28 @@ class HomePatientCard extends StatelessWidget {
final Color backgroundIconColor;
final String text;
final Color textColor;
final Function onTap;
final VoidCallback onTap;
final double iconSize;
HomePatientCard({
@required this.backgroundColor,
@required this.backgroundIconColor,
this.backgroundColor,
this.backgroundIconColor,
this.cardIcon,
this.cardIconImage,
@required this.text,
@required this.textColor,
@required this.onTap,
this.text,
this.textColor,
this.onTap,
this.iconSize = 30,
});
@override
Widget build(BuildContext context) {
double width = SizeConfig.heightMultiplier*
(SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightLarge?15:13);
return HomePageCard(
color: backgroundColor,
margin: EdgeInsets.all(4),
width: width,
margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121),
child: Container(
padding: EdgeInsets.all(8),
child: Column(
@ -67,7 +70,8 @@ class HomePatientCard extends StatelessWidget {
cardIcon != null
? Icon(
cardIcon,
size: iconSize,
size:
SizeConfig.getWidthMultiplier(width: width) * 30,
color: textColor,
)
: Image.asset(
@ -90,7 +94,9 @@ class HomePatientCard extends StatelessWidget {
text,
color: textColor,
textAlign: TextAlign.start,
fontSize: SizeConfig.textMultiplier * 1.6,
fontSize:
SizeConfig.getTextMultiplierBasedOnWidth(width: width) *
(SizeConfig.isHeightVeryShort ? 11 : 10),
),
),
),

@ -290,9 +290,7 @@ class _HomeScreenState extends State<HomeScreen> {
firstLine: TranslationBase.of(context).patients,
secondLine: TranslationBase.of(context).services,
),
SizedBox(
height: 10,
),
Container(
height: 120,
child: ListView(
@ -322,9 +320,9 @@ class _HomeScreenState extends State<HomeScreen> {
colorIndex = 0;
List<Color> backgroundColors = List(3);
backgroundColors[0] = Color(0xffD02127);
backgroundColors[0] = AppGlobal.appRedColor;
backgroundColors[1] = Colors.grey[300];
backgroundColors[2] = Color(0xff2B353E);
backgroundColors[2] = Color(0xFF2B353E);
List<Color> backgroundIconColors = List(3);
backgroundIconColors[0] = Colors.white12;
backgroundIconColors[1] = Colors.white38;

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -30,16 +31,16 @@ class GetActivityCard extends StatelessWidget {
value.value.toString(),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* 25,
fontWeight: FontWeight.bold,
color: Color(0xFF2B353E),
color: AppGlobal.appTextColor,
letterSpacing: -0.93,
),
AppText(
value.kPIParameter,
textOverflow: TextOverflow.clip,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* (SizeConfig.isHeightVeryShort?8: SizeConfig.isHeightShort?8: 9),
color: Color(0xFF2B353E),
color: AppGlobal.appTextColor,
textAlign: TextAlign.start,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
letterSpacing: -0.33,
),
],

Loading…
Cancel
Save