diff --git a/lib/config/config.dart b/lib/config/config.dart index c67e2990..9bca1b94 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; 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'; @@ -119,6 +119,9 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; //URL to get clinic list 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 const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; diff --git a/lib/main.dart b/lib/main.dart index c5663640..7438de94 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,14 +1,16 @@ +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; + import 'config/size_config.dart'; import 'core/viewModels/project_view_model.dart'; import 'locator.dart'; -import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; void main() async { setupLocator(); @@ -29,6 +31,8 @@ class MyApp extends StatelessWidget { ChangeNotifierProvider( create: (context) => ProjectViewModel(), ), + ChangeNotifierProvider( + create: (context) => ToDoCountProviderModel()), ChangeNotifierProvider( create: (context) => SearchProvider()), ChangeNotifierProvider.value( diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart new file mode 100644 index 00000000..5c74cfb5 --- /dev/null +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -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(); + } +} diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart index ff24b1ca..aa6e3b9f 100644 --- a/lib/pages/BookAppointment/components/DocInfo.dart +++ b/lib/pages/BookAppointment/components/DocInfo.dart @@ -1,9 +1,9 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class DoctorInformation extends StatelessWidget { - DoctorProfileList docProfileList; DoctorInformation({@required this.docProfileList}); @@ -27,8 +27,8 @@ class DoctorInformation extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Image.asset( - "assets/images/new-design/doctor_information_icon.png"), + SvgPicture.asset( + "assets/images/DQ/doctor_information_icon.svg"), Container( margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), child: Text(TranslationBase.of(context).docInfo, @@ -43,12 +43,21 @@ class DoctorInformation extends StatelessWidget { child: Table( children: [ TableRow(children: [ - TableCell(child: _getHeadingText(TranslationBase.of(context).gender)), - TableCell(child: _getHeadingText(TranslationBase.of(context).nationality)), + TableCell( + child: _getHeadingText( + TranslationBase.of(context).gender)), + TableCell( + child: _getHeadingText( + TranslationBase.of(context).nationality)), ]), TableRow(children: [ - TableCell(child: _getNormalText(docProfileList.genderDescription)), - TableCell(child: _getNormalTextWithIcon(docProfileList.nationalityName, docProfileList.nationalityFlagURL)), + TableCell( + child: _getNormalText( + docProfileList.genderDescription)), + TableCell( + child: _getNormalTextWithIcon( + docProfileList.nationalityName, + docProfileList.nationalityFlagURL)), ]), ], ), @@ -82,13 +91,14 @@ class DoctorInformation extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Image.asset( - "assets/images/new-design/doctor_qualification_icon.png"), + SvgPicture.asset( + "assets/images/DQ/doctor_qualification_icon.svg"), Container( margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), - child: Text(TranslationBase.of(context).docQualifications, + child: Text( + TranslationBase.of(context).docQualifications, 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])), Container( margin: EdgeInsets.only(left: 5.0, right: 5.0), - child: Image.network( - icon, - width: 18.0, - height: 18.0), + child: Image.network(icon, width: 18.0, height: 18.0), ), ], ), diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index eeda7b01..bbaa7260 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -82,7 +82,7 @@ class _ToDoState extends State { height: 20.0), Container( margin: - EdgeInsets.only(left: 5.0, right: 25.0), + EdgeInsets.only(left: 5.0, right: 20.0), child: Text( getDate(widget .appoList[index].appointmentDate), @@ -112,6 +112,8 @@ class _ToDoState extends State { ? widget .appoList[index].projectName : "-", + overflow: TextOverflow.clip, + maxLines: 2, style: TextStyle(fontSize: 11.0)), ), ], diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 2fbcbcc1..7c461815 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -24,7 +24,7 @@ class _PaymentDialogState extends State { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), child: Container( - height: 510.0, + height: 550.0, width: 450.0, child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 209d0f06..92091664 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,19 +1,13 @@ 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/project_view_model.dart'; -import 'package:diplomaticquarterapp/d_q_icons_icons.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/models/Appointments/toDoCountProviderModel.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/Covid-DriveThru/covid-drivethru-location.dart'; -import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/labs/labs_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/paymentService/payment_service.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/translations_delegate_base.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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class HomePage extends StatefulWidget { @@ -43,9 +37,20 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { + var toDoProvider; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + getToDoCount(); + }); + super.initState(); + } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); return BaseView( onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => AppScaffold( @@ -69,6 +74,20 @@ class _HomePageState extends State { 'assets/images/dq_home_page_bg_image.png'), fit: BoxFit.cover), ), + child: Stack( + children: [ + 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), @@ -76,8 +95,16 @@ class _HomePageState extends State { ), Positioned( top: 40, - left: MediaQuery.of(context).size.width * (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), + left: MediaQuery.of(context).size.width * + (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) ? Container( width: double.infinity, @@ -126,7 +153,10 @@ class _HomePageState extends State { }, child: Container( margin: EdgeInsets.all(2), - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context) + .size + .width * + 0.30, height: 30, decoration: BoxDecoration( color: Colors.white, @@ -141,7 +171,8 @@ class _HomePageState extends State { child: Texts( TranslationBase.of(context) .viewMore, - color: Theme.of(context).primaryColor, + color: Theme.of(context) + .primaryColor, fontSize: 12, ), ), @@ -154,7 +185,7 @@ class _HomePageState extends State { ) : Container( width: double.infinity, - height: projectViewModel.isArabic ? 175: 160, + height: projectViewModel.isArabic ? 180 : 150, decoration: BoxDecoration( color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, @@ -172,7 +203,7 @@ class _HomePageState extends State { child: Container( margin: EdgeInsets.all(5), child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ @@ -204,7 +235,8 @@ class _HomePageState extends State { Texts( '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', color: Colors.grey[100], - fontWeight: FontWeight.normal, + fontWeight: + FontWeight.normal, fontSize: 14, ), ], @@ -216,7 +248,10 @@ class _HomePageState extends State { }, child: Container( margin: EdgeInsets.all(2), - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context) + .size + .width * + 0.30, height: 30, decoration: BoxDecoration( color: Colors.white, @@ -230,8 +265,10 @@ class _HomePageState extends State { ), child: Center( child: Texts( - TranslationBase.of(context).viewMore, - color: Theme.of(context).primaryColor, + TranslationBase.of(context) + .viewMore, + color: Theme.of(context) + .primaryColor, fontSize: 12, bold: true, ), @@ -244,17 +281,19 @@ class _HomePageState extends State { children: [ Expanded( child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( 'assets/images/height_icon.png', width: 30, height: 55, ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Texts( "${model.heightCm}", @@ -276,8 +315,10 @@ class _HomePageState extends State { ), Expanded( child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( 'assets/images/test-weight.png', @@ -290,7 +331,6 @@ class _HomePageState extends State { '${model.weightKg}', color: Colors.white, bold: true, - ), Texts( TranslationBase.of(context).weight, @@ -711,6 +751,23 @@ class _HomePageState extends State { Navigator.push(context, 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 { @@ -761,7 +818,8 @@ class DashboardItem extends StatelessWidget { ? DecorationImage( image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, - colorFilter: new ColorFilter.mode(Colors.black.withOpacity(opacity), BlendMode.dstIn), + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(opacity), BlendMode.dstIn), ) : icon, ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 86940594..d5df2215 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -1,8 +1,10 @@ import 'dart:math'; +import 'package:badges/badges.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/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; @@ -46,6 +48,7 @@ class _MedicalProfilePageState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + var appoCountProvider = Provider.of(context); return BaseView( onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget) => AppScaffold( @@ -106,12 +109,33 @@ class _MedicalProfilePageState extends State { ), ); }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myAppointments, - imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context) - .myAppointmentsList, + child: Stack( + children: [ + MedicalProfileItem( + title: TranslationBase.of(context) + .myAppointments, + 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)), + ), + ), + ), + ] ), ), ), diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 61c5ad59..a508b08b 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -44,6 +44,34 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getActiveAppointmentNo(context) async { + Map 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 getProjectsList(context) async { Map request; var languageID = await sharedPref.getString(APP_LANGUAGE); diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index e623dde5..6bc8560a 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class BottomNavigationItem extends StatelessWidget { final IconData icon; @@ -20,6 +23,7 @@ class BottomNavigationItem extends StatelessWidget { @override Widget build(BuildContext context) { + var model = Provider.of(context); return Expanded( child: SizedBox( // height: 72.0, @@ -29,35 +33,84 @@ class BottomNavigationItem extends StatelessWidget { highlightColor: Colors.transparent, splashColor: Colors.transparent, onTap: () => changeIndex(currentIndex), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - 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, - ), - - // Added TextAlign Property - Texts( - name, - textAlign: TextAlign.center, - color: currentIndex == index - ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, - fontSize: 11, - ), - ], - ), + child: currentIndex != 4 + ? Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + 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, + ), + ], + ) + : 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: [ + 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, + ), + ], + ), + ], + ), ), ), ), diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index 04bf3bb9..a0076f7d 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -1,20 +1,20 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import '../text.dart'; class MedicalProfileItem extends StatelessWidget { - MedicalProfileItem({ - @required this.imagePath, - @required this.title, - @required this.subTitle, - }); + MedicalProfileItem( + {@required this.imagePath, + @required this.title, + @required this.subTitle, + hasBadge}); final String imagePath; final String title; final String subTitle; + final bool hasBadge = false; @override Widget build(BuildContext context) { @@ -22,10 +22,11 @@ class MedicalProfileItem extends StatelessWidget { showBorder: true, borderWidth: 0, margin: 4, - height:120,// MediaQuery.of(context).size.height * 0.12, + height: 120, + // MediaQuery.of(context).size.height * 0.12, child: Container( //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), child: Column( diff --git a/pubspec.yaml b/pubspec.yaml index 8b83aac1..2c9cb05f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -86,7 +86,6 @@ dependencies: # Calendar table_calendar: ^2.2.3 - # SVG Images flutter_svg: ^0.18.0 @@ -156,6 +155,8 @@ dependencies: speech_to_text: path: speech_to_text + badges: ^1.1.4 + dev_dependencies: flutter_test: sdk: flutter