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/pages/landing/widgets/logged_slider_view.dart

138 lines
5.9 KiB
Dart

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