Merge branch 'diplomatic-quarter-haroon' into 'diplomatic-quarter-live'

Diplomatic quarter haroon

See merge request Cloud_Solution/diplomatic-quarter!89
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit f3e64eaa6b

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -119,6 +119,9 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list //URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list //URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';

@ -1,14 +1,16 @@
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
import 'core/viewModels/project_view_model.dart'; import 'core/viewModels/project_view_model.dart';
import 'locator.dart'; import 'locator.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
void main() async { void main() async {
setupLocator(); setupLocator();
@ -29,6 +31,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider<ProjectViewModel>( ChangeNotifierProvider<ProjectViewModel>(
create: (context) => ProjectViewModel(), create: (context) => ProjectViewModel(),
), ),
ChangeNotifierProvider<ToDoCountProviderModel>(
create: (context) => ToDoCountProviderModel()),
ChangeNotifierProvider<SearchProvider>( ChangeNotifierProvider<SearchProvider>(
create: (context) => SearchProvider()), create: (context) => SearchProvider()),
ChangeNotifierProvider.value( ChangeNotifierProvider.value(

@ -0,0 +1,12 @@
import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier {
int _count;
int get count => _count;
void setState(int count) {
_count = count;
notifyListeners();
}
}

@ -1,9 +1,9 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class DoctorInformation extends StatelessWidget { class DoctorInformation extends StatelessWidget {
DoctorProfileList docProfileList; DoctorProfileList docProfileList;
DoctorInformation({@required this.docProfileList}); DoctorInformation({@required this.docProfileList});
@ -27,8 +27,8 @@ class DoctorInformation extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( SvgPicture.asset(
"assets/images/new-design/doctor_information_icon.png"), "assets/images/DQ/doctor_information_icon.svg"),
Container( Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo, child: Text(TranslationBase.of(context).docInfo,
@ -43,12 +43,21 @@ class DoctorInformation extends StatelessWidget {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
TableCell(child: _getHeadingText(TranslationBase.of(context).gender)), TableCell(
TableCell(child: _getHeadingText(TranslationBase.of(context).nationality)), child: _getHeadingText(
TranslationBase.of(context).gender)),
TableCell(
child: _getHeadingText(
TranslationBase.of(context).nationality)),
]), ]),
TableRow(children: [ TableRow(children: [
TableCell(child: _getNormalText(docProfileList.genderDescription)), TableCell(
TableCell(child: _getNormalTextWithIcon(docProfileList.nationalityName, docProfileList.nationalityFlagURL)), child: _getNormalText(
docProfileList.genderDescription)),
TableCell(
child: _getNormalTextWithIcon(
docProfileList.nationalityName,
docProfileList.nationalityFlagURL)),
]), ]),
], ],
), ),
@ -82,13 +91,14 @@ class DoctorInformation extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( SvgPicture.asset(
"assets/images/new-design/doctor_qualification_icon.png"), "assets/images/DQ/doctor_qualification_icon.svg"),
Container( Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docQualifications, child: Text(
TranslationBase.of(context).docQualifications,
style: style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)), TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
), ),
], ],
), ),
@ -146,10 +156,7 @@ class DoctorInformation extends StatelessWidget {
color: Colors.grey[700])), color: Colors.grey[700])),
Container( Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Image.network( child: Image.network(icon, width: 18.0, height: 18.0),
icon,
width: 18.0,
height: 18.0),
), ),
], ],
), ),

@ -82,7 +82,7 @@ class _ToDoState extends State<ToDo> {
height: 20.0), height: 20.0),
Container( Container(
margin: margin:
EdgeInsets.only(left: 5.0, right: 25.0), EdgeInsets.only(left: 5.0, right: 20.0),
child: Text( child: Text(
getDate(widget getDate(widget
.appoList[index].appointmentDate), .appoList[index].appointmentDate),
@ -112,6 +112,8 @@ class _ToDoState extends State<ToDo> {
? widget ? widget
.appoList[index].projectName .appoList[index].projectName
: "-", : "-",
overflow: TextOverflow.clip,
maxLines: 2,
style: TextStyle(fontSize: 11.0)), style: TextStyle(fontSize: 11.0)),
), ),
], ],

@ -24,7 +24,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
shape: shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container( child: Container(
height: 510.0, height: 550.0,
width: 450.0, width: 450.0,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -1,19 +1,13 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/d_q_icons_icons.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/active_medications/ActiveMedicationsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
@ -21,6 +15,8 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/medicine_search_screen.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/medicine_search_screen.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
@ -29,8 +25,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
@ -43,9 +37,20 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
var toDoProvider;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getToDoCount();
});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
@ -69,6 +74,20 @@ class _HomePageState extends State<HomePage> {
'assets/images/dq_home_page_bg_image.png'), 'assets/images/dq_home_page_bg_image.png'),
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
child: Stack(
children: <Widget>[
Positioned(
top: 15,
left: 5,
right: 5,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
child: Container(),
),
)
],
),
), ),
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110), Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110),
@ -76,8 +95,16 @@ class _HomePageState extends State<HomePage> {
), ),
Positioned( Positioned(
top: 40, top: 40,
left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), left: MediaQuery.of(context).size.width *
right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), (MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin && projectViewModel.user == null) child: (!model.isLogin && projectViewModel.user == null)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -126,7 +153,10 @@ class _HomePageState extends State<HomePage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context)
.size
.width *
0.30,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -141,7 +171,8 @@ class _HomePageState extends State<HomePage> {
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context)
.viewMore, .viewMore,
color: Theme.of(context).primaryColor, color: Theme.of(context)
.primaryColor,
fontSize: 12, fontSize: 12,
), ),
), ),
@ -154,7 +185,7 @@ class _HomePageState extends State<HomePage> {
) )
: Container( : Container(
width: double.infinity, width: double.infinity,
height: projectViewModel.isArabic ? 175: 160, height: projectViewModel.isArabic ? 180 : 150,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -172,7 +203,7 @@ class _HomePageState extends State<HomePage> {
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
@ -204,7 +235,8 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
color: Colors.grey[100], color: Colors.grey[100],
fontWeight: FontWeight.normal, fontWeight:
FontWeight.normal,
fontSize: 14, fontSize: 14,
), ),
], ],
@ -216,7 +248,10 @@ class _HomePageState extends State<HomePage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context)
.size
.width *
0.30,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -230,8 +265,10 @@ class _HomePageState extends State<HomePage> {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context)
color: Theme.of(context).primaryColor, .viewMore,
color: Theme.of(context)
.primaryColor,
fontSize: 12, fontSize: 12,
bold: true, bold: true,
), ),
@ -244,17 +281,19 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.center, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/height_icon.png', 'assets/images/height_icon.png',
width: 30, width: 30,
height: 55, height: 55,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
"${model.heightCm}", "${model.heightCm}",
@ -276,8 +315,10 @@ class _HomePageState extends State<HomePage> {
), ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.center, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/test-weight.png', 'assets/images/test-weight.png',
@ -290,7 +331,6 @@ class _HomePageState extends State<HomePage> {
'${model.weightKg}', '${model.weightKg}',
color: Colors.white, color: Colors.white,
bold: true, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).weight, TranslationBase.of(context).weight,
@ -711,6 +751,23 @@ class _HomePageState extends State<HomePage> {
Navigator.push(context, Navigator.push(context,
MaterialPageRoute(builder: (context) => CovidDrivethruLocation())); MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
} }
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
setState(() {
toDoProvider.setState(res['AppointmentActiveNumber']);
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
});
}
} }
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {
@ -761,7 +818,8 @@ class DashboardItem extends StatelessWidget {
? DecorationImage( ? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(opacity), BlendMode.dstIn), colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(opacity), BlendMode.dstIn),
) )
: icon, : icon,
), ),

@ -1,8 +1,10 @@
import 'dart:math'; import 'dart:math';
import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
@ -46,6 +48,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
return BaseView<MedicalViewModel>( return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -106,12 +109,33 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
); );
}, },
child: MedicalProfileItem( child: Stack(
title: TranslationBase.of(context) children: [
.myAppointments, MedicalProfileItem(
imagePath: 'my_appointment_icon.png', title: TranslationBase.of(context)
subTitle: TranslationBase.of(context) .myAppointments,
.myAppointmentsList, imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context)
.myAppointmentsList,
hasBadge: true,
),
Positioned(
right: 0.0,
child: Badge(
toAnimate: false,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
badgeColor: Color(0xFF40ACC9).withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(appoCountProvider.count.toString(),
style: TextStyle(
color: Colors.white, fontSize: 16.0)),
),
),
),
]
), ),
), ),
), ),

@ -44,6 +44,34 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getActiveAppointmentNo(context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"TokenID": "",
"IsActiveAppointment": true,
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
};
dynamic localRes;
await baseAppClient.post(GET_ACTIVE_APPOINTMENTS_LIST_URL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getProjectsList(context) async { Future<Map> getProjectsList(context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE); var languageID = await sharedPref.getString(APP_LANGUAGE);

@ -1,6 +1,9 @@
import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class BottomNavigationItem extends StatelessWidget { class BottomNavigationItem extends StatelessWidget {
final IconData icon; final IconData icon;
@ -20,6 +23,7 @@ class BottomNavigationItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var model = Provider.of<ToDoCountProviderModel>(context);
return Expanded( return Expanded(
child: SizedBox( child: SizedBox(
// height: 72.0, // height: 72.0,
@ -29,35 +33,84 @@ class BottomNavigationItem extends StatelessWidget {
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
splashColor: Colors.transparent, splashColor: Colors.transparent,
onTap: () => changeIndex(currentIndex), onTap: () => changeIndex(currentIndex),
child: Column( child: currentIndex != 4
mainAxisSize: MainAxisSize.min, ? Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min,
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.center,
SizedBox( children: <Widget>[
height: 15, SizedBox(
), height: 15,
Container( ),
child: Icon(currentIndex == index ? activeIcon : icon, Container(
color: currentIndex == index child: Icon(currentIndex == index ? activeIcon : icon,
? Theme.of(context).primaryColor color: currentIndex == index
: Theme.of(context).dividerColor, ? Theme.of(context).primaryColor
size: 22.0), : Theme.of(context).dividerColor,
), size: 22.0),
SizedBox( ),
height: 5, SizedBox(
), height: 5,
),
// Added TextAlign Property Texts(
Texts( name,
name, textAlign: TextAlign.center,
textAlign: TextAlign.center, color: currentIndex == index
color: currentIndex == index ? Theme.of(context).primaryColor
? Theme.of(context).primaryColor : Theme.of(context).dividerColor,
: Theme.of(context).dividerColor, fontSize: 11,
fontSize: 11, ),
), ],
], )
), : Stack(
alignment: AlignmentDirectional.center,
children: [
Positioned(
right: 18.0,
bottom: 28.0,
child: Badge(
toAnimate: false,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
badgeColor: Color(0xFF40ACC9).withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(model.count.toString(),
style: TextStyle(
color: Colors.white, fontSize: 14.0)),
),
),
),
Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 15,
),
Container(
child: Icon(
currentIndex == index ? activeIcon : icon,
color: currentIndex == index
? Theme.of(context).primaryColor
: Theme.of(context).dividerColor,
size: 22.0),
),
SizedBox(
height: 5,
),
Texts(
name,
textAlign: TextAlign.center,
color: currentIndex == index
? Theme.of(context).primaryColor
: Theme.of(context).dividerColor,
fontSize: 11,
),
],
),
],
),
), ),
), ),
), ),

@ -1,20 +1,20 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../text.dart'; import '../text.dart';
class MedicalProfileItem extends StatelessWidget { class MedicalProfileItem extends StatelessWidget {
MedicalProfileItem({ MedicalProfileItem(
@required this.imagePath, {@required this.imagePath,
@required this.title, @required this.title,
@required this.subTitle, @required this.subTitle,
}); hasBadge});
final String imagePath; final String imagePath;
final String title; final String title;
final String subTitle; final String subTitle;
final bool hasBadge = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -22,10 +22,11 @@ class MedicalProfileItem extends StatelessWidget {
showBorder: true, showBorder: true,
borderWidth: 0, borderWidth: 0,
margin: 4, margin: 4,
height:120,// MediaQuery.of(context).size.height * 0.12, height: 120,
// MediaQuery.of(context).size.height * 0.12,
child: Container( child: Container(
//width: MediaQuery.of(context).size.width * 0.25, //width: MediaQuery.of(context).size.width * 0.25,
// width: MediaQuery.of(context).size.width* 0.40, // width: MediaQuery.of(context).size.width* 0.40,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Column( child: Column(

@ -86,7 +86,6 @@ dependencies:
# Calendar # Calendar
table_calendar: ^2.2.3 table_calendar: ^2.2.3
# SVG Images # SVG Images
flutter_svg: ^0.18.0 flutter_svg: ^0.18.0
@ -156,6 +155,8 @@ dependencies:
speech_to_text: speech_to_text:
path: speech_to_text path: speech_to_text
badges: ^1.1.4
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

Loading…
Cancel
Save