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.
diplomatic-quarter/lib/widgets/data_display/medical/medical_profile_item.dart

58 lines
1.9 KiB
Dart

import 'package:diplomaticquarterapp/config/size_config.dart';
4 years ago
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart';
4 years ago
import 'package:provider/provider.dart';
import '../text.dart';
class MedicalProfileItem extends StatelessWidget {
4 years ago
MedicalProfileItem(
{@required this.imagePath,
@required this.title,
@required this.subTitle,
hasBadge});
final String imagePath;
final String title;
final String subTitle;
4 years ago
final bool hasBadge = false;
@override
Widget build(BuildContext context) {
4 years ago
ProjectViewModel projectViewModel = Provider.of(context);
return RoundedContainer(
4 years ago
showBorder: true,
borderWidth: 0,
margin: 4,
height: 120,
// MediaQuery.of(context).size.height * 0.12,
child: Container(
4 years ago
//width: MediaQuery.of(context).size.width * 0.25,
// width: MediaQuery.of(context).size.width* 0.40,
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
4 years ago
Texts(title,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,),
Align(
4 years ago
alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: Image.asset(
"assets/images/medical/$imagePath",
height: SizeConfig.heightMultiplier * 5,
width: SizeConfig.heightMultiplier * 5,
),
)
],
),
),
);
}
}