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.
109 lines
3.6 KiB
Dart
109 lines
3.6 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../../../Constants.dart';
|
|
import '../text.dart';
|
|
|
|
class MedicalProfileItem extends StatelessWidget {
|
|
final String imagePath;
|
|
final String title;
|
|
final String subTitle;
|
|
final bool hasBadge = false;
|
|
bool isEnable;
|
|
|
|
MedicalProfileItem({
|
|
@required this.imagePath,
|
|
@required this.title,
|
|
@required this.subTitle,
|
|
hasBadge,
|
|
this.isEnable = true,
|
|
});
|
|
|
|
@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),
|
|
SvgPicture.asset(
|
|
"assets/images/new/services/$imagePath",
|
|
height: SizeConfig.widthMultiplier * 7,
|
|
width: SizeConfig.widthMultiplier * 7,
|
|
),
|
|
mFlex(2),
|
|
Text(
|
|
title,
|
|
maxLines: 1,
|
|
style: TextStyle(
|
|
fontSize: SizeConfig.textMultiplier * 1.4,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.3,
|
|
height: 13 / 10,
|
|
),
|
|
),
|
|
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,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|