|
|
|
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
|
|
|
|
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:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/slider_data.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
|
|
|
class LoggedSliderView extends StatelessWidget {
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
SliderData sliderData;
|
|
|
|
DashboardViewModel model;
|
|
|
|
|
|
|
|
LoggedSliderView(this.projectViewModel, this.sliderData, this.model);
|
|
|
|
|
|
|
|
@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(2),
|
|
|
|
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(1),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mHeight(2),
|
|
|
|
Text(
|
|
|
|
sliderData.pateintId,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: -0.36,
|
|
|
|
height: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mHeight(3),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 20, right: 20),
|
|
|
|
child: Text(
|
|
|
|
'${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime)} ,${projectViewModel.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user.age.toString() + "y"}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: -0.33,
|
|
|
|
height: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mFlex(3),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 20, right: 20),
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
SvgPicture.asset(
|
|
|
|
'assets/images/new/height.svg',
|
|
|
|
width: 12,
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
mWidth(6),
|
|
|
|
Texts(
|
|
|
|
"${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}",
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 10,
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
width: 3,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
SvgPicture.asset(
|
|
|
|
'assets/images/new/weight.svg',
|
|
|
|
width: 12,
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
mWidth(6),
|
|
|
|
Texts('${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 10)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
width: 3,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
SvgPicture.asset(
|
|
|
|
'assets/images/new/blood.svg',
|
|
|
|
width: 12,
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
mWidth(6),
|
|
|
|
Texts('${TranslationBase.of(context).bloodD}: ${model.booldType}', color: Colors.white, fontSize: 10)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
mFlex(2),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|