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.
128 lines
4.3 KiB
Dart
128 lines
4.3 KiB
Dart
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
class MedicalProfileItem extends StatelessWidget {
|
|
final String imagePath;
|
|
final String title;
|
|
final String subTitle;
|
|
final bool hasBadge = false;
|
|
final bool isPngImage;
|
|
final bool isInPatient;
|
|
bool isEnable;
|
|
Color? imgColor;
|
|
final width;
|
|
final height;
|
|
|
|
MedicalProfileItem(
|
|
{required this.imagePath,
|
|
required this.title,
|
|
required this.subTitle,
|
|
hasBadge,
|
|
this.isEnable = true,
|
|
this.imgColor,
|
|
this.isPngImage = false,
|
|
this.width,
|
|
this.height, this.isInPatient = false});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
//ProjectViewModel projectViewModel = Provider.of(context);
|
|
return Container(
|
|
height: double.infinity,
|
|
width: double.infinity,
|
|
margin: EdgeInsets.all(0),
|
|
decoration: containerColorRadiusBorderWidth(
|
|
Colors.white, 15, CustomColors.pharmacyGreyColor, 1),
|
|
clipBehavior: Clip.antiAlias,
|
|
child: Stack(
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsets.all(10),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
// Align(
|
|
// alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
|
|
// child: Image.asset(
|
|
// "assets/images/medical/$imagePath",
|
|
// height: SizeConfig.heightMultiplier * 5,
|
|
// width: SizeConfig.heightMultiplier * 5,
|
|
// ),
|
|
// ),
|
|
mFlex(1),
|
|
isPngImage
|
|
? Image.asset(
|
|
imagePath,
|
|
width: width != null
|
|
? width
|
|
: SizeConfig.widthMultiplier! * 7,
|
|
height: height != null
|
|
? height
|
|
: SizeConfig.widthMultiplier! * 7,
|
|
color: imgColor,
|
|
)
|
|
: SvgPicture.asset(
|
|
isInPatient ? "assets/images/new/inpatient/$imagePath" : "assets/images/new/services/$imagePath",
|
|
height: height != null
|
|
? height
|
|
: SizeConfig.widthMultiplier! * 7,
|
|
width: width != null
|
|
? width
|
|
: SizeConfig.widthMultiplier! * 7,
|
|
color: imgColor,
|
|
),
|
|
mFlex(2),
|
|
Text(
|
|
title,
|
|
maxLines: 1,
|
|
style: TextStyle(
|
|
fontSize: SizeConfig.textMultiplier! * 1.4,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.3,
|
|
height: 13 / 10,
|
|
),
|
|
),
|
|
if (subTitle != null)
|
|
Container(
|
|
width: double.infinity,
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Text(
|
|
subTitle,
|
|
maxLines: 1,
|
|
style: TextStyle(
|
|
fontSize: SizeConfig.textMultiplier! * 1.4,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.3,
|
|
height: 1,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
mFlex(1),
|
|
],
|
|
),
|
|
),
|
|
isEnable
|
|
? Container()
|
|
: Container(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
color: Colors.grey.withOpacity(0.6),
|
|
child: Icon(
|
|
Icons.lock_outline,
|
|
size: 40,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|