Medical Profile Page improvements

merge-requests/390/head
Mirza.Shafique 4 years ago
parent 4ebf5f900b
commit 2d62822536

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="110.999" height="110.999" viewBox="0 0 110.999 110.999">
<g id="user_21_" data-name="user (21)" opacity="0.05">
<path id="Path_4696" data-name="Path 4696" d="M272.482,267.883a25.756,25.756,0,0,0,5.549-15.868,26.015,26.015,0,1,0-26.015,26.015,25.756,25.756,0,0,0,15.868-5.549l14.569,14.569a3.252,3.252,0,1,0,4.6-4.6ZM260.818,256.22a3.252,3.252,0,1,1-4.6,4.6l-4.2-4.2-4.2,4.2a3.252,3.252,0,0,1-4.6-4.6l4.2-4.2-4.2-4.2a3.252,3.252,0,0,1,4.6-4.6l4.2,4.2,4.2-4.2a3.252,3.252,0,1,1,4.6,4.6l-4.2,4.2Z" transform="translate(-177.004 -177.004)" fill="#fff"/>
<circle id="Ellipse_165" data-name="Ellipse 165" cx="3.5" cy="3.5" r="3.5" transform="translate(35.5 19.499)" fill="#fff"/>
<path id="Path_4697" data-name="Path 4697" d="M197.516,362h0Z" transform="translate(-154.695 -283.52)" fill="#fff"/>
<path id="Path_4698" data-name="Path 4698" d="M197.516,332h0Z" transform="translate(-154.695 -260.021)" fill="#fff"/>
<path id="Path_4699" data-name="Path 4699" d="M3.252,111H75.011a3.25,3.25,0,0,0,3.252-3.252v-.329a31.763,31.763,0,0,1-3.252.329,32.393,32.393,0,0,1-23.165-9.756H16.476a3.252,3.252,0,0,1,0-6.5H47.016v0a32.2,32.2,0,0,1-2.865-6.507H16.476a3.252,3.252,0,0,1,0-6.5H42.821c-.454-4.484-.454-2.022,0-6.5H16.476a3.252,3.252,0,1,1,0-6.5H44.152a32.468,32.468,0,0,1,7.694-13.009H26.232a3.25,3.25,0,0,1-3.252-3.252V45.96A13.021,13.021,0,0,1,35.988,32.953H39.24A9.756,9.756,0,1,1,49,23.2a9.767,9.767,0,0,1-9.756,9.756h3.252A13.021,13.021,0,0,1,55.5,45.96v3.252c0,.071-.036.13-.04.2a32.2,32.2,0,0,1,19.552-6.7,31.762,31.762,0,0,1,3.252.329V3.252A3.25,3.25,0,0,0,75.011,0H3.252A3.25,3.25,0,0,0,0,3.252v104.5A3.25,3.25,0,0,0,3.252,111Z" fill="#fff"/>
<path id="Path_4700" data-name="Path 4700" d="M142.5,182a6.512,6.512,0,0,0-6.5,6.5h19.512a6.512,6.512,0,0,0-6.5-6.5Z" transform="translate(-106.516 -142.543)" fill="#fff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -445,6 +445,7 @@ const Map localizedValues = {
"ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
"HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "},
"noAppointmentAvailable": {"en": "No Available Appointments", "ar": "لا توجد مواعيد متاحة"},
"HomeHealthCareText": {
"en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",

@ -1783,6 +1783,7 @@ class TranslationBase {
String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode];
String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode];
String get noAppointmentAvailable => localizedValues["noAppointmentAvailable"][locale.languageCode];
String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode];

@ -1,15 +1,23 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class TimeLineView extends StatefulWidget {
@ -76,107 +84,191 @@ class _TimeLineViewState extends State<TimeLineView> {
width: double.infinity,
height: 210,
decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
widget.isLogged? mFlex(2):mHeight(12),
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: Row(
child: widget.isLogged && tempList.length > 0
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mFlex(2),
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: Row(
children: [
Text(
TranslationBase.of(context).appointments,
style: TextStyle(
color: CustomColors.white,
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
Text(
TranslationBase.of(context).timeLine,
style: TextStyle(
color: CustomColors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).appointments,
style: TextStyle(
color: CustomColors.white,
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
Text(
TranslationBase.of(context).timeLine,
style: TextStyle(
color: CustomColors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
),
widget.isLogged
? Container(
decoration: containerRadius(Color(0xFF2B2E31), 100),
height: 30,
child: DropdownButtonHideUnderline(
child: ButtonTheme(
alignedDropdown: true,
child: DropdownButton<DateObj>(
hint: Text(
TranslationBase.of(context).all,
style: TextStyle(color: CustomColors.grey2, fontSize: 10),
),
iconEnabledColor: CustomColors.grey2,
style: TextStyle(color: CustomColors.grey2, fontSize: 10),
dropdownColor: Color(0xFF2B2E31),
value: selectedDateObj,
items: dateObjs.map((DateObj value) {
return DropdownMenuItem<DateObj>(
value: value,
child: new AutoSizeText(
value.monthYear,
),
);
}).toList(),
onChanged: (r) {
selectedDateObj = r;
applyFilter(r.year == 0 ? true : false);
setState(() {});
},
underline: Container(
height: 0,
),
),
),
),
)
: Container()
],
),
),
mFlex(1),
widget.isLogged
? Container(
decoration: containerRadius(Color(0xFF2B2E31), 100),
height: 30,
child: DropdownButtonHideUnderline(
child: ButtonTheme(
alignedDropdown: true,
child: DropdownButton<DateObj>(
hint: Text(
TranslationBase.of(context).all,
style: TextStyle(color: CustomColors.grey2, fontSize: 10),
),
iconEnabledColor: CustomColors.grey2,
style: TextStyle(color: CustomColors.grey2, fontSize: 10),
dropdownColor: Color(0xFF2B2E31),
value: selectedDateObj,
items: dateObjs.map((DateObj value) {
return DropdownMenuItem<DateObj>(
value: value,
child: new AutoSizeText(
value.monthYear,
),
);
}).toList(),
onChanged: (r) {
selectedDateObj = r;
applyFilter(r.year == 0 ? true : false);
setState(() {});
},
underline: Container(
height: 0,
),
height: widget.isArabic ? 130 : 110,
width: double.infinity,
child: ListView.separated(
itemBuilder: (context, index) => Padding(
padding: widget.isArabic
? EdgeInsets.only(left: index == 0 ? 0 : 12, right: (tempList.length - 1) == index ? 0 : 12)
: EdgeInsets.only(left: index == 0 ? 12 : 0, right: (tempList.length - 1) == index ? 12 : 0),
child: TimelineNewWidget(
appoitmentAllHistoryResul: tempList[index],
isLast: tempList.length - 1 == index ? true : false,
),
),
itemCount: tempList.length,
scrollDirection: Axis.horizontal,
shrinkWrap: false,
physics: BouncingScrollPhysics(),
separatorBuilder: (BuildContext context, int index) {
return mWidth(8);
},
),
)
: Container()
: Container(),
],
),
),
mFlex(1),
widget.isLogged
? Container(
height: widget.isArabic ? 130 : 110,
width: double.infinity,
child: ListView.separated(
itemBuilder: (context, index) => Padding(
padding: widget.isArabic
? EdgeInsets.only(left: index == 0 ? 0 : 12, right: (tempList.length - 1) == index ? 0 : 12)
: EdgeInsets.only(left: index == 0 ? 12 : 0, right: (tempList.length - 1) == index ? 12 : 0),
child: TimelineNewWidget(
appoitmentAllHistoryResul: tempList[index],
isLast: tempList.length - 1 == index ? true : false,
)
: emptyView(widget.isLogged),
);
}
Widget emptyView(bool isLogged) {
return Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mFlex(2),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).appointments,
style: TextStyle(
color: CustomColors.white,
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
itemCount: tempList.length,
scrollDirection: Axis.horizontal,
shrinkWrap: false,
physics: BouncingScrollPhysics(),
separatorBuilder: (BuildContext context, int index) {
return mWidth(8);
},
Text(
TranslationBase.of(context).timeLine,
style: TextStyle(
color: CustomColors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
mFlex(1),
Text(
isLogged ? TranslationBase.of(context).noAppointmentAvailable : TranslationBase.of(context).cantSeeProfile,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 14,
),
)
: Container(),
),
mHeight(4),
!isLogged
? Container(
height: MediaQuery.of(context).size.width / 14,
width: MediaQuery.of(context).size.width / (widget.isArabic ? 4 : 6),
child: RaisedButton(
shape: cardRadius(8),
color: Color(0xFFFBF2E31),
padding: EdgeInsets.zero,
onPressed: () {
// onLoginClick();
login();
},
child: Center(
child: AutoSizeText(
TranslationBase.of(context).login,
maxLines: 1,
style: TextStyle(color: Colors.white, fontSize: 14),
),
),
),
)
: Container(
height: MediaQuery.of(context).size.width / 14,
),
mFlex(3),
],
),
),
SvgPicture.asset("assets/images/new/empty.svg"),
mWidth(20),
],
),
);
}
login() async {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}
class TimelineNewWidget extends StatelessWidget {

Loading…
Cancel
Save