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.
94 lines
3.3 KiB
Dart
94 lines
3.3 KiB
Dart
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class ExaminationIitemCard extends StatelessWidget {
|
|
final MySelectedExamination examination;
|
|
final Function removeExamination;
|
|
|
|
ExaminationIitemCard(this.examination, this.removeExamination);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
return Container(
|
|
color: Colors.white,
|
|
padding: EdgeInsets.all(8),
|
|
margin: EdgeInsets.only(bottom: 8),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
child: AppText(
|
|
projectViewModel.isArabic
|
|
? examination.selectedExamination.nameAr != null &&
|
|
examination.selectedExamination.nameAr != ""
|
|
? examination.selectedExamination.nameAr
|
|
: examination.selectedExamination.nameEn
|
|
: examination.selectedExamination.nameEn,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: 'Poppins',
|
|
color: Color(0x2B353E),
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
),
|
|
)),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
TranslationBase.of(context).remove,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: 'Poppins',
|
|
color: Colors.red.shade800,
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
),
|
|
InkWell(
|
|
onTap: removeExamination,
|
|
child: Icon(
|
|
Icons.clear,
|
|
size: 20,
|
|
color: Colors.red.shade800,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
AppText(
|
|
!examination.isNormal
|
|
? examination.isAbnormal
|
|
? TranslationBase.of(context).abnormal
|
|
: TranslationBase.of(context).notExamined
|
|
: TranslationBase.of(context).normal,
|
|
fontWeight: FontWeight.bold,
|
|
fontFamily: 'Poppins',
|
|
color: !examination.isNormal
|
|
? examination.isAbnormal
|
|
? Colors.red.shade800
|
|
: Colors.grey.shade800
|
|
: Colors.green.shade800,
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
AppText(
|
|
examination.remark,
|
|
fontWeight: FontWeight.normal,
|
|
fontFamily: 'Poppins',
|
|
color: Color(0xFF575757),
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|