merger DQ live and fix some issues on Child Vaccines

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
parent a556e8c1f8
commit fa01d132c7

@ -123,7 +123,16 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/my_file_bottom_bar.png', 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: LiveCareHome(),
),
),
imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
title: TranslationBase.of(context).livecare,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -148,7 +157,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/al-habib_online_payment_service_icon.png', 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
),
ServicesContainer( ServicesContainer(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -163,7 +180,37 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/emergency_service_image.png', imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService, title: TranslationBase.of(context).emergencyService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -175,7 +222,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/family_menu_icon_red.png', 'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family', title: 'My Family',
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -187,7 +242,61 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/upcoming_icon_bottom_bar.png', 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,

@ -0,0 +1,111 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ChildDetailsWidget extends StatelessWidget {
final ChildVaccinesViewModel model;
final List_BabyInformationModel babyInfo;
DeleteBaby deleteBaby = DeleteBaby();
ChildDetailsWidget({this.model, this.babyInfo});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 5, right: 5, bottom: 10),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
padding: EdgeInsets.all(12),
width: 200,
//double.infinity,
child: Column(
children: [
Row(children: [
Texts("CHILD NAME"),
]),
Row(children: [
Texts(babyInfo.babyName.trim()),
]),
Row(children: [
IconButton(
icon: Image.asset(babyInfo.gender == 1
? 'assets/images/new-design/male.png'
: 'assets/images/new-design/female.png'),
tooltip: '',
onPressed: () {
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
},
),
Texts(babyInfo.genderDescription),
IconButton(
icon: Icon(
Icons.remove_red_eye,
color: Colors.red,
),
tooltip: '',
onPressed: () {
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(),
),
);
},
)
]),
Row(children: [
Texts("Birthday"),
]),
Row(
children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/calender-secondary.png'),
tooltip: '',
),
Texts(
DateUtil.yearMonthDay(babyInfo.dOB),
),
],
),
Row(children: [
IconButton(
icon: new Image.asset('assets/images/new-design/garbage.png'),
tooltip: '',
onPressed: () async {
await model.deleteBabyOrders(newChild: deleteBaby);
deleteBaby.babyID = babyInfo.babyID;
await model.deleteBabyOrders(newChild: deleteBaby);
if (model.isDeleted) {
AppToast.showSuccessToast(message: "Record Deleted");
Navigator.pop(context, model.isDeleted);
} else {
//TODO handling error
}
},
),
Texts("Delete"),
]),
SizedBox(
height: 12,
),
],
),
);
}
}

@ -13,6 +13,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'ChidDetailsWidget.dart';
import 'dialogs/delete_child.dart'; import 'dialogs/delete_child.dart';
class ChildPage extends StatefulWidget { class ChildPage extends StatefulWidget {
@ -22,7 +23,6 @@ class ChildPage extends StatefulWidget {
class _ChildPageState extends State<ChildPage> class _ChildPageState extends State<ChildPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
DeleteBaby deleteBaby = DeleteBaby(); DeleteBaby deleteBaby = DeleteBaby();
@override @override
@ -36,141 +36,35 @@ class _ChildPageState extends State<ChildPage>
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70), margin: EdgeInsets.only(left: 10, right: 10, top: 10),
child: Column(
children: [
...List.generate(
model.babyInformationModelList.length,
(index) => Container(
margin: EdgeInsets.only(
left: 0, right: 0, bottom: 20),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.white, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
padding: EdgeInsets.all(12),
width: 200,//double.infinity,
child: Column( child: Column(
children: [ children: [
Row(children: [ GridView.builder(
Texts("CHILD NAME"), shrinkWrap: true,
]), primary: false,
Row(children: [ physics: NeverScrollableScrollPhysics(),
Texts(model gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
.babyInformationModelList[index] crossAxisCount: 2,
.babyName childAspectRatio: MediaQuery.of(context).size.width /
.trim()), (MediaQuery.of(context).size.height / 1.25),
]),
Row(children: [
IconButton(
icon: Image.asset(model
.babyInformationModelList[
index]
.gender ==
1
? 'assets/images/new-design/male.png'
: 'assets/images/new-design/female.png'),
tooltip: '',
onPressed: () {
setState(() {
// _volume += 10;
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
});
},
),
Texts(model
.babyInformationModelList[index]
.genderDescription),
IconButton(
icon: Icon(
Icons.remove_red_eye,
color: Colors.red,
),
tooltip: '',
onPressed: () {
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(),
), ),
itemCount: model.babyInformationModelList.length,
itemBuilder: (BuildContext context, int index) {
return ChildDetailsWidget(
model: model,
babyInfo: model.babyInformationModelList[index],
); );
},
)
]),
Row(children: [
Texts("Birthday"),
]),
Row(children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/calender-secondary.png'),
tooltip: '',
onPressed: () {
setState(() {
});
}, },
), ),
Texts(DateUtil.yearMonthDay(model
.babyInformationModelList[index]
.dOB)),
]),
Row(children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/garbage.png'),
tooltip: '',
onPressed: ()async {
//=====================
await model.deleteBabyOrders(newChild:deleteBaby );
deleteBaby.babyID=model.babyInformationModelList[index]
.babyID;
await model.deleteBabyOrders(newChild:deleteBaby );
if(model.isDeleted){
AppToast.showSuccessToast(message: "Record Deleted");
Navigator.pop(context,model.isDeleted);
}else{
//TODO handling error
}
},
),
Texts("Delete"),
]),
SizedBox( SizedBox(
height: 12, height: 15,
), ),
], ],
), ),
), ),
)
],
))
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
@ -197,6 +91,7 @@ class _ChildPageState extends State<ChildPage>
}, },
), ),
), ),
)); ),
);
} }
} }

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
@ -13,27 +12,26 @@ 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';
class ChildVaccinesPage extends StatefulWidget { class ChildVaccinesPage extends StatefulWidget {
@override @override
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
} }
class _ChildVaccinesPageState extends State<ChildVaccinesPage> class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin{ with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
var checkedValue=false; var checkedValue = false;
String addEmail=""; String addEmail = "";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<UserInformationViewModel>( return BaseView<UserInformationViewModel>(
onModelReady: (model) => model.getUserInformationRequestOrders(), onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, appBarTitle: " Vaccination",
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
@ -46,181 +44,118 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child:Container( child: Container(
child: Texts("Welcome back",fontSize: 20,), child: Texts(
) , "Welcome back",
fontSize: 20,
),
),
),
Divider(
color: Colors.black,
indent: 10,
endIndent: 10,
), ),
Divider(color:Colors.black , indent: 10,
endIndent: 10,),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child:Container( child: Container(
child: Texts("Please ensure that the email address is up-to-date and process to view the schedule",fontSize: 20,), child: Texts(
) , "Please ensure that the email address is up-to-date and process to view the schedule",
fontSize: 20,
),
),
), ),
Divider(color:Colors.black , indent: 10, Divider(
endIndent: 10,), color: Colors.black,
indent: 10,
endIndent: 10,
),
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child:Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
fillColor: Colors.red, fillColor: Colors.red,
hintText: model.user.emailAddress, hintText: model.user.emailAddress,
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,
hintColor: Colors.black, hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onChanged: (text) { onChanged: (text) {
addEmail=text; addEmail = text;
model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true; model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
}, },
validator: (value) { validator: (value) {
if (value == null) {
if (value == null) return model.user.emailAddress;
{ } else {
return model.user.emailAddress; return model.user.emailAddress;
} }
else
{
return model.user.emailAddress;}
}, },
), ),
), ),
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: "UPDATE EMAIL", label: "UPDATE EMAIL",
// //
onTap: (){ onTap: () {
model.user.emailAddress=addEmail.toString(); model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast( AppToast.showSuccessToast(message: "Email updated");
message: "Email updated");
// bloodDetails.city=_selectedHospital.toString(); // bloodDetails.city=_selectedHospital.toString();
// bloodDetails. // bloodDetails.
}, },
), ),
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: Color.fromRGBO(63, 72, 74, 1,), color: Color.fromRGBO(
63,
72,
74,
1,
),
label: " VIEW LIST OF CHILDREN", label: " VIEW LIST OF CHILDREN",
// //
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: ChildPage(), page: ChildPage(),
),
),
),
),
// Texts(
// // TranslationBase.of(context).advancePaymentLabel,
// model.user.emailAddress,
// textAlign: TextAlign.center,
// ),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
), ),
SizedBox(
height: 12,
), ),
SizedBox(
height: 12,
), ),
SizedBox(
height: 12,
), ),
SizedBox(
height: 10,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Center(
// child: Container(
// color: Colors.white,
// width: 350,
// child: InkWell(
// onTap: () {
// showDialog(
// context: context,
// builder: (_) =>
// AssetGiffyDialog(
// title: Text(
// "",
// style: TextStyle(
// fontSize: 22.0,
// fontWeight:
// FontWeight
// .w600),
// ),
// image: Image.asset(
// 'assets/images/BloodChrt_EN.png'),
// buttonCancelText:
// Text('cancel'),
// buttonCancelColor:
// Colors.grey,
// onlyCancelButton: true,
// ));
// },
// child: Container(
// width: 250,
// height: 200,
// child:Image.asset(
// 'assets/images/BloodChrt_EN.png')),
// ),
// ),
// ),
// ],
// ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.15, height: MediaQuery.of(context).size.height * 0.15,
) )
], ],
), ),
), ),
), ),
); );
} }
} }

@ -1,8 +1,6 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.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/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.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/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';
@ -24,8 +22,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../locator.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
final Function goToMyProfile; final Function goToMyProfile;
@ -36,22 +32,9 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getToDoCount();
});
super.initState();
}
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@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(
@ -72,7 +55,7 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage(
'assets/images/dq_home_page_bg_image.png'), 'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
child: Stack( child: Stack(
@ -223,12 +206,12 @@ class _HomePageState extends State<HomePage> {
Orientation.landscape Orientation.landscape
? 0.02 ? 0.02
: 0.03), : 0.03),
child: (!model.isLogin ) child: (!model.isLogin && projectViewModel.user == null)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: 160, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -263,36 +246,31 @@ class _HomePageState extends State<HomePage> {
), ),
Align( Align(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
? Alignment.bottomLeft ? Alignment.bottomRight
: Alignment.bottomRight, : Alignment.bottomLeft,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();
}, },
child: Container( child: Container(
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
width: MediaQuery.of(context) width: 90,
.size
.width *
0.30,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, color: Colors.transparent,
width: 0.5), width: 0.5),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(4)), Radius.circular(9)),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context)
.viewMore, .viewMore,
color: Theme.of(context) color: Colors.white,
.primaryColor, fontSize: 12,
fontSize: 14,
), ),
), ),
), ),
@ -304,9 +282,9 @@ class _HomePageState extends State<HomePage> {
) )
: Container( : Container(
width: double.infinity, width: double.infinity,
height: projectViewModel.isArabic ? 180 : 150, height: 130,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
@ -721,23 +699,25 @@ class _HomePageState extends State<HomePage> {
child: Container(), child: Container(),
), ),
Texts( Texts(
TranslationBase.of(context).viewAll, TranslationBase.of(context).viewMore,
color: Colors.white, color: Colors.white,
bold: true, //fontWeight: FontWeight.normal,
) )
], ],
), ),
), ),
height: 100, height: 100,
imageName: 'ask_doctor_bg.png', imageName: 'contact_us_bg.png',
//color: Colors.grey[700], opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())), context, FadePage(page: AllHabibMedicalService())),
), ),
DashboardItem( DashboardItem(
opacity:1.0,
onTap: () { onTap: () {
// Navigator.push(
// context, FadePage(page: FeedbackHomePage()));
Navigator.push( Navigator.push(
context, FadePage(page: ContactUsPage())); context, FadePage(page: ContactUsPage()));
}, },
@ -762,15 +742,16 @@ class _HomePageState extends State<HomePage> {
child: Container(), child: Container(),
), ),
Texts( Texts(
TranslationBase.of(context).viewAll, TranslationBase.of(context).viewMore,
color: Colors.white, color: Colors.white,
bold: true, fontWeight: FontWeight.normal,
) )
], ],
), ),
), ),
height: 100, height: 100,
imageName: 'rectangle.png', imageName: 'contact_us_bg.png',
opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
), ),
@ -792,23 +773,6 @@ 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 {
@ -822,7 +786,7 @@ class DashboardItem extends StatelessWidget {
this.height, this.height,
this.color, this.color,
this.opacity = 0.4, this.opacity = 0.4,
this.hasColorFilter = true, this.margin, this.icon}) this.hasColorFilter = true})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;
@ -832,8 +796,6 @@ class DashboardItem extends StatelessWidget {
final double height; final double height;
final Color color; final Color color;
final double opacity; final double opacity;
final double margin;
final Widget icon;
final bool hasColorFilter; final bool hasColorFilter;
@override @override
@ -851,7 +813,7 @@ class DashboardItem extends StatelessWidget {
color: !hasBorder color: !hasBorder
? color != null ? color != null
? color ? color
: Colors.black.withOpacity(opacity) : HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder border: hasBorder
@ -861,12 +823,11 @@ 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( colorFilter: hasColorFilter ? new ColorFilter.mode(
Colors.black.withOpacity(opacity), BlendMode.dstIn), Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
) )
: icon, : null,
), ),
margin: EdgeInsets.all(margin),
child: Center( child: Center(
child: child, child: child,
), ),

Loading…
Cancel
Save