|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/slider_data.dart';
|
|
|
|
|
|
|
|
class LoggedSliderView extends StatelessWidget {
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
SliderData sliderData;
|
|
|
|
|
|
|
|
LoggedSliderView(this.projectViewModel, this.sliderData);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
//'${DateUtil.getMonthDayYearDateFormatted(sliderData.dateofBirthDataTime)} ,${model.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user.age.toString() + "y"}',
|
|
|
|
return Card(
|
|
|
|
shape: cardRadius(20),
|
|
|
|
elevation: 0,
|
|
|
|
margin: EdgeInsets.all(0),
|
|
|
|
child: Card(
|
|
|
|
shape: cardRadius(20),
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
color: sliderData.darkColor,
|
|
|
|
elevation: 0,
|
|
|
|
// padding: EdgeInsets.zero,
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
Card(
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
),
|
|
|
|
color: Colors.transparent,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
elevation: 8,
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
decoration: projectViewModel.isArabic
|
|
|
|
? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor)
|
|
|
|
: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor),
|
|
|
|
child: Card(
|
|
|
|
color: Colors.transparent,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
elevation: 8,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
mFlex(3),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6),
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).medicalFile,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 10,
|
|
|
|
letterSpacing: -0.3,
|
|
|
|
height: 1.2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mWidth(MediaQuery.of(context).size.width / 50),
|
|
|
|
//circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white),
|
|
|
|
mFlex(1),
|
|
|
|
projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(),
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).verified,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 10,
|
|
|
|
letterSpacing: -0.3,
|
|
|
|
height: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
!projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(),
|
|
|
|
mWidth(MediaQuery.of(context).size.width / 70),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
mFlex(2),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 20, right: 20),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
sliderData.pateintName.toLowerCase().capitalizeFirstofEach,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 17,
|
|
|
|
letterSpacing: -0.25,
|
|
|
|
height: 25 / 17,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
sliderData.pateintId,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: -0.36,
|
|
|
|
height: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mFlex(3),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 20, right: 20),
|
|
|
|
child: Text(
|
|
|
|
"34 Years, Male, 4 January 1987",
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: -0.36,
|
|
|
|
height: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mFlex(4),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
projectViewModel.isArabic
|
|
|
|
? Positioned(
|
|
|
|
child: Icon(
|
|
|
|
Icons.arrow_forward,
|
|
|
|
color: Colors.white,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
bottom: 8,
|
|
|
|
left: 8,
|
|
|
|
)
|
|
|
|
: Positioned(
|
|
|
|
child: Icon(
|
|
|
|
Icons.arrow_forward_rounded,
|
|
|
|
color: Colors.white,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
bottom: 8,
|
|
|
|
right: 8,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|