live care design 3.0

merge-update-with-lab-changes
Mirza.Shafique 4 years ago
parent 853ca033d2
commit 6af1747f12

@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -1,15 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ScheduleClinicCard extends StatefulWidget {
bool isSelected;
final ClinicsHaveScheduleList clinicsHaveScheduleList;
var languageID;
ScheduleClinicCard(
{this.isSelected,
this.languageID,
@required this.clinicsHaveScheduleList});
ScheduleClinicCard({this.isSelected, this.languageID, @required this.clinicsHaveScheduleList});
@override
_ScheduleClinicCardState createState() => _ScheduleClinicCardState();
@ -18,29 +18,72 @@ class ScheduleClinicCard extends StatefulWidget {
class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
child: Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 8.0),
color: widget.isSelected ? Color(0xff06b806) : Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
width: double.infinity,
margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 8.0),
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: widget.isSelected ? 3 : 0, color: widget.isSelected ? CustomColors.green : Colors.transparent),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.transparent,
),
child: Container(
decoration: BoxDecoration(
color: CustomColors.green ,
borderRadius: BorderRadius.all(
Radius.circular(6.0),
),
),
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
padding: EdgeInsets.all(12.0),
margin: EdgeInsets.only(
left: projectViewModel.isArabic
? 0
: widget.isSelected
? 4
: 6,
right: projectViewModel.isArabic ? widget.isSelected
? 4
: 6: 0),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
child: Text(
widget.languageID == 'ar'
? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: ""
: widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Test Clinic",
style: TextStyle(
fontSize: 16.0,
color:
widget.isSelected ? Colors.white : Colors.black)),
widget.languageID == 'ar'
? widget.clinicsHaveScheduleList.clinicDescN != null
? widget.clinicsHaveScheduleList.clinicDescN
: ""
: widget.clinicsHaveScheduleList.clinicDesc != null
? widget.clinicsHaveScheduleList.clinicDesc
: "Test Clinic",
style: TextStyle(
fontSize: 16.0,
color: Colors.black,
fontWeight: FontWeight.w600,
),
),
),
],
),

@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -450,64 +451,63 @@ class _clinic_listState extends State<ClinicList> {
return Column(
children: <Widget>[
isDataLoaded
? Container(
height: MediaQuery.of(context).size.height * 0.7,
child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
),
);
},
),
Container(
height: 10.0,
),
],
)
: getNoDataWidget(context),
)
? Expanded(
child: Container(
child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
mHeight(10),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
),
);
},
),
Container(
height: 10.0,
),
],
)
: getNoDataWidget(context),
),
)
: Container(),
isDataLoaded
? Align(
alignment: FractionalOffset.bottomCenter,
child: Container(
width: MediaQuery.of(context).size.width,
height: 50.0,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: startScheduleLiveCare,
child: Text(TranslationBase.of(context).start, style: TextStyle(fontSize: 18.0)),
),
),
? Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
)
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.accentColor,
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: startScheduleLiveCare,
child: Text(TranslationBase.of(context).start, style: TextStyle(fontSize: 18.0)),
),
),
)
: Container(),
],
);

Loading…
Cancel
Save