Merge branch 'flutter_2_developemt' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into headers_refactor
Conflicts: lib/screens/patients/profile/lab_result/laboratory_result_page.dart lib/screens/patients/profile/lab_result/labs_home_page.dart lib/widgets/patients/profile/patient-profile-app-bar.dartmerge-requests/738/head
commit
737d0e9bec
@ -0,0 +1,41 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
|
||||
class ScanQrService extends BaseService {
|
||||
List<PatiantInformtion> myInPatientList = List();
|
||||
List<PatiantInformtion> inPatientList = List();
|
||||
|
||||
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
|
||||
hasError = false;
|
||||
await getDoctorProfile();
|
||||
|
||||
if (isMyInpatient) {
|
||||
requestModel.doctorID = doctorProfile.doctorID;
|
||||
} else {
|
||||
requestModel.doctorID = 0;
|
||||
}
|
||||
|
||||
await baseAppClient.post(
|
||||
GET_PATIENT_IN_PATIENT_LIST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
inPatientList.clear();
|
||||
myInPatientList.clear();
|
||||
|
||||
response['List_MyInPatient'].forEach((v) {
|
||||
PatiantInformtion patient = PatiantInformtion.fromJson(v);
|
||||
inPatientList.add(patient);
|
||||
if (patient.doctorId == doctorProfile.doctorID) {
|
||||
myInPatientList.add(patient);
|
||||
}
|
||||
});
|
||||
},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
},
|
||||
body: requestModel.toJson(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
|
||||
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
|
||||
|
||||
class SpecialClinicsService extends BaseService {
|
||||
|
||||
|
||||
List<GetSpecialClinicalCareListResponseModel> _specialClinicalCareList = [];
|
||||
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicalCareList;
|
||||
|
||||
List<GetSpecialClinicalCareMappingListResponseModel> _specialClinicalCareMappingList = [];
|
||||
List<GetSpecialClinicalCareMappingListResponseModel> get specialClinicalCareMappingList => _specialClinicalCareMappingList;
|
||||
Future getSpecialClinicalCareList() async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(
|
||||
GET_SPECIAL_CLINICAL_CARE_LIST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
|
||||
_specialClinicalCareList.clear();
|
||||
response['List_SpecialClinicalCareList'].forEach((v) {
|
||||
_specialClinicalCareList.add(GetSpecialClinicalCareListResponseModel.fromJson(v));
|
||||
});},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
},
|
||||
body: {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Future getSpecialClinicalCareMappingList(int clinicId) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(
|
||||
GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
|
||||
_specialClinicalCareMappingList.clear();
|
||||
response['List_SpecialClinicalCareMappingList'].forEach((v) {
|
||||
_specialClinicalCareMappingList.add(GetSpecialClinicalCareMappingListResponseModel.fromJson(v));
|
||||
});},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
},
|
||||
body: {
|
||||
"ClinicID": clinicId,
|
||||
"DoctorID":0,
|
||||
"EditedBy":0
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
||||
import 'package:doctor_app_flutter/core/service/home/scan_qr_service.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
import 'package:doctor_app_flutter/locator.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
|
||||
class ScanQrViewModel extends BaseViewModel {
|
||||
ScanQrService _scanQrService = locator<ScanQrService>();
|
||||
List<PatiantInformtion> get inPatientList => _scanQrService.inPatientList;
|
||||
|
||||
Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false}) async {
|
||||
await getDoctorProfile();
|
||||
setState(ViewState.Busy);
|
||||
|
||||
await _scanQrService.getInPatient(requestModel, false);
|
||||
if (_scanQrService.hasError) {
|
||||
error = _scanQrService.error;
|
||||
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
// setDefaultInPatientList();
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
class GetSpecialClinicalCareListResponseModel {
|
||||
int projectID;
|
||||
int clinicID;
|
||||
String clinicDescription;
|
||||
String clinicDescriptionN;
|
||||
bool isActive;
|
||||
|
||||
GetSpecialClinicalCareListResponseModel(
|
||||
{this.projectID,
|
||||
this.clinicID,
|
||||
this.clinicDescription,
|
||||
this.clinicDescriptionN,
|
||||
this.isActive});
|
||||
|
||||
GetSpecialClinicalCareListResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
projectID = json['ProjectID'];
|
||||
clinicID = json['ClinicID'];
|
||||
clinicDescription = json['ClinicDescription'];
|
||||
clinicDescriptionN = json['ClinicDescriptionN'];
|
||||
isActive = json['IsActive'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicDescription'] = this.clinicDescription;
|
||||
data['ClinicDescriptionN'] = this.clinicDescriptionN;
|
||||
data['IsActive'] = this.isActive;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
class GetSpecialClinicalCareMappingListResponseModel {
|
||||
int mappingProjectID;
|
||||
int clinicID;
|
||||
int nursingStationID;
|
||||
bool isActive;
|
||||
int projectID;
|
||||
String description;
|
||||
|
||||
GetSpecialClinicalCareMappingListResponseModel(
|
||||
{this.mappingProjectID,
|
||||
this.clinicID,
|
||||
this.nursingStationID,
|
||||
this.isActive,
|
||||
this.projectID,
|
||||
this.description});
|
||||
|
||||
GetSpecialClinicalCareMappingListResponseModel.fromJson(
|
||||
Map<String, dynamic> json) {
|
||||
mappingProjectID = json['MappingProjectID'];
|
||||
clinicID = json['ClinicID'];
|
||||
nursingStationID = json['NursingStationID'];
|
||||
isActive = json['IsActive'];
|
||||
projectID = json['ProjectID'];
|
||||
description = json['Description'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['MappingProjectID'] = this.mappingProjectID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['NursingStationID'] = this.nursingStationID;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['Description'] = this.description;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,195 @@
|
||||
|
||||
import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart';
|
||||
import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'label.dart';
|
||||
|
||||
class DashboardReferralPatient extends StatelessWidget {
|
||||
final List<DashboardModel> dashboardItemList;
|
||||
final double height;
|
||||
final DashboardViewModel model;
|
||||
|
||||
const DashboardReferralPatient({Key key, this.dashboardItemList, this.height, this.model}) : super(key: key);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RoundedContainer(
|
||||
raduis: 16,
|
||||
showBorder: false,
|
||||
borderColor: Colors.white,
|
||||
shadowWidth: 0.2,
|
||||
shadowSpreadRadius: 3,
|
||||
shadowDy: 1,
|
||||
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
||||
child:
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: height) *
|
||||
(SizeConfig.isHeightVeryShort
|
||||
? 3
|
||||
: SizeConfig.isHeightShort
|
||||
? 2
|
||||
: 2)
|
||||
),
|
||||
Label(firstLine: TranslationBase
|
||||
.of(context)
|
||||
.patients,
|
||||
secondLine: TranslationBase
|
||||
.of(context)
|
||||
.referral,
|
||||
color: Color(0xFF2B353E),
|
||||
secondLineFontSize: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: height) *
|
||||
(SizeConfig.isHeightVeryShort
|
||||
? 5
|
||||
: SizeConfig.isHeightShort
|
||||
? 7
|
||||
: 12),),
|
||||
|
||||
SizedBox(
|
||||
height: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: height) *
|
||||
(SizeConfig.isHeightVeryShort
|
||||
? 5
|
||||
: SizeConfig.isHeightShort
|
||||
? 10
|
||||
: 5)
|
||||
)
|
||||
],
|
||||
),),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
RowCounts(
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[0]
|
||||
.kPIParameter,
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[0]
|
||||
.value,
|
||||
Colors.black, height: height,),
|
||||
RowCounts(
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[1]
|
||||
.kPIParameter,
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[1]
|
||||
.value,
|
||||
Colors.grey, height: height,),
|
||||
RowCounts(
|
||||
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[2]
|
||||
.kPIParameter,
|
||||
dashboardItemList[2]
|
||||
.summaryoptions[2]
|
||||
.value,
|
||||
Colors.red, height: height,),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Stack(children: [
|
||||
Container(
|
||||
padding:EdgeInsets.all(0),
|
||||
|
||||
child: GaugeChart(
|
||||
_createReferralData(dashboardItemList))),
|
||||
Positioned(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
AppText(
|
||||
model
|
||||
.getPatientCount(dashboardItemList[2])
|
||||
.toString(),
|
||||
fontSize: SizeConfig.textMultiplier * 3.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
],
|
||||
),
|
||||
top: height * (SizeConfig.isHeightVeryShort?0.35:0.40),
|
||||
left: 0,
|
||||
right: 0)
|
||||
]),
|
||||
),
|
||||
],
|
||||
)),
|
||||
]));
|
||||
}
|
||||
static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) {
|
||||
final data = [
|
||||
new GaugeSegment(
|
||||
dashboardItemList[2].summaryoptions[0].kPIParameter,
|
||||
getValue(dashboardItemList[1].summaryoptions[0].value),
|
||||
charts.MaterialPalette.black),
|
||||
new GaugeSegment(
|
||||
dashboardItemList[2].summaryoptions[1].kPIParameter,
|
||||
getValue(dashboardItemList[1].summaryoptions[1].value),
|
||||
charts.MaterialPalette.gray.shadeDefault),
|
||||
new GaugeSegment(
|
||||
dashboardItemList[2].summaryoptions[2].kPIParameter,
|
||||
getValue(dashboardItemList[1].summaryoptions[2].value),
|
||||
charts.MaterialPalette.red.shadeDefault),
|
||||
];
|
||||
|
||||
return [
|
||||
new charts.Series<GaugeSegment, String>(
|
||||
id: 'Segments',
|
||||
domainFn: (GaugeSegment segment, _) => segment.segment,
|
||||
measureFn: (GaugeSegment segment, _) => segment.size,
|
||||
data: data,
|
||||
colorFn: (GaugeSegment segment, _) => segment.color,
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
static int getValue(value) {
|
||||
return value == 0 ? 1 : value;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,219 @@
|
||||
// ignore: must_be_immutable
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class HomeScreenHeader extends StatefulWidget with PreferredSizeWidget {
|
||||
|
||||
final DashboardViewModel model;
|
||||
final Function onOpenDrawer;
|
||||
|
||||
double height = SizeConfig.heightMultiplier *
|
||||
(SizeConfig.isHeightVeryShort ? 10 : 6);
|
||||
|
||||
HomeScreenHeader({Key key, this.model, this.onOpenDrawer}) : super(key: key);
|
||||
|
||||
@override
|
||||
_HomeScreenHeaderState createState() => _HomeScreenHeaderState();
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size(double.maxFinite,height);
|
||||
}
|
||||
|
||||
class _HomeScreenHeaderState extends State<HomeScreenHeader> {
|
||||
ProjectViewModel projectsProvider;
|
||||
int clinicId;
|
||||
|
||||
|
||||
AuthenticationViewModel authenticationViewModel;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
|
||||
authenticationViewModel = Provider.of<AuthenticationViewModel>(context);
|
||||
|
||||
return widget.model.state == ViewState.Busy
|
||||
? Container(color: Colors.grey.withOpacity(0.65))
|
||||
: Container(
|
||||
color: Colors.grey[100],
|
||||
child: Stack(children: [
|
||||
IconButton(
|
||||
icon: Icon(FontAwesomeIcons.ellipsisH),
|
||||
iconSize: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort?4: 3),
|
||||
color: Colors.black,
|
||||
onPressed: () {
|
||||
widget.onOpenDrawer();
|
||||
},
|
||||
),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
ProfileWelcomeWidget(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * .6,
|
||||
child: projectsProvider.doctorClinicsList.length >
|
||||
0
|
||||
? Stack(
|
||||
children: [
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
dropdownColor: Colors.white,
|
||||
iconEnabledColor: Colors.black,
|
||||
isExpanded: true,
|
||||
value: clinicId == null
|
||||
? projectsProvider
|
||||
.doctorClinicsList[0].clinicID
|
||||
: clinicId,
|
||||
iconSize: SizeConfig.widthMultiplier * 7,
|
||||
elevation: 16,
|
||||
selectedItemBuilder:
|
||||
(BuildContext context) {
|
||||
return projectsProvider
|
||||
.doctorClinicsList
|
||||
.map((item) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding:
|
||||
EdgeInsets.all(2),
|
||||
margin:
|
||||
EdgeInsets.all(2),
|
||||
decoration:
|
||||
new BoxDecoration(
|
||||
color:
|
||||
Colors.red[800],
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
20),
|
||||
),
|
||||
constraints:
|
||||
BoxConstraints(
|
||||
minWidth: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: widget.height) *
|
||||
35,
|
||||
minHeight: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: widget.height) *
|
||||
30,
|
||||
),
|
||||
child: Center(
|
||||
child: AppText(
|
||||
projectsProvider
|
||||
.doctorClinicsList
|
||||
.length
|
||||
.toString(),
|
||||
color:
|
||||
Colors.white,
|
||||
fontSize:
|
||||
projectsProvider
|
||||
.isArabic
|
||||
? SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: widget.height)
|
||||
: SizeConfig
|
||||
.getHeightMultiplier(
|
||||
height: widget
|
||||
.height) * 20,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
AppText(item.clinicName,
|
||||
fontSize: SizeConfig
|
||||
.getTextMultiplierBasedOnWidth(
|
||||
width: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * .6) * (SizeConfig.isWidthLarge?4:5),
|
||||
color: Color(0xFF2B353E),
|
||||
maxLines: 1,
|
||||
maxLength: 2,
|
||||
letterSpacing: -0.96,
|
||||
textOverflow: TextOverflow
|
||||
.ellipsis,
|
||||
fontWeight:
|
||||
FontWeight.bold,
|
||||
textAlign: TextAlign.end),
|
||||
],
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
onChanged: (newValue) async {
|
||||
setState(() {
|
||||
clinicId = newValue;
|
||||
});
|
||||
|
||||
GifLoaderDialogUtils.showMyDialog(
|
||||
context);
|
||||
await widget.model.changeClinic(newValue,
|
||||
authenticationViewModel);
|
||||
GifLoaderDialogUtils.hideDialog(
|
||||
context);
|
||||
if (widget.model.state ==
|
||||
ViewState.ErrorLocal) {
|
||||
DrAppToastMsg.showErrorToast(
|
||||
widget.model.error);
|
||||
}
|
||||
},
|
||||
items: projectsProvider
|
||||
.doctorClinicsList
|
||||
.map((item) {
|
||||
return DropdownMenuItem(
|
||||
child: AppText(
|
||||
item.clinicName,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
value: item.clinicID,
|
||||
);
|
||||
}).toList(),
|
||||
)),
|
||||
],
|
||||
)
|
||||
: AppText(
|
||||
TranslationBase
|
||||
.of(context)
|
||||
.noClinic),
|
||||
),
|
||||
],
|
||||
),
|
||||
isClinic: true,
|
||||
height: widget.height,
|
||||
),
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
// ignore: must_be_immutable
|
||||
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class Label extends StatelessWidget {
|
||||
Label({
|
||||
Key key, this.firstLine, this.secondLine, this.color= const Color(0xFF2E303A), this.secondLineFontSize, this.firstLineFontSize,
|
||||
}) : super(key: key);
|
||||
final String firstLine;
|
||||
final String secondLine;
|
||||
Color color;
|
||||
final double secondLineFontSize;
|
||||
final double firstLineFontSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
firstLine,
|
||||
fontSize: firstLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() *(SizeConfig.isWidthLarge?2:3) ,
|
||||
// fontWeight: FontWeight.bold,
|
||||
color: color,
|
||||
fontHeight: .5,
|
||||
letterSpacing: -0.72,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
AppText(
|
||||
secondLine,
|
||||
color: color,
|
||||
fontSize: secondLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?4:6.40),
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: -1.44,
|
||||
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GetActivityButton extends StatelessWidget {
|
||||
final value;
|
||||
|
||||
GetActivityButton(this.value);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.height * 0.125,
|
||||
padding: EdgeInsets.all(5),
|
||||
margin: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
AppText(
|
||||
value.value.toString(),
|
||||
fontSize: 27,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF2B353E),
|
||||
),
|
||||
AppText(
|
||||
value.kPIParameter,
|
||||
textOverflow: TextOverflow.clip,
|
||||
fontSize: 10,
|
||||
color: Color(0xFF2B353E),
|
||||
textAlign: TextAlign.start,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GetActivityCard extends StatelessWidget {
|
||||
final value;
|
||||
|
||||
GetActivityCard(this.value);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double width = SizeConfig.heightMultiplier* (SizeConfig.isHeightVeryShort?16:SizeConfig.isHeightShort?14:SizeConfig.isHeightLarge?15:13);
|
||||
return Container(
|
||||
width: width,
|
||||
padding: EdgeInsets.symmetric(horizontal: SizeConfig.heightMultiplier * .4, vertical: SizeConfig.heightMultiplier * .2),
|
||||
margin: EdgeInsets.all(SizeConfig.widthMultiplier *1),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(8,8, 8, 4),
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
value.value.toString(),
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF2B353E),
|
||||
letterSpacing: -0.93,
|
||||
),
|
||||
AppText(
|
||||
value.kPIParameter,
|
||||
textOverflow: TextOverflow.clip,
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* (SizeConfig.isHeightVeryShort?8: SizeConfig.isHeightShort?8: 9),
|
||||
color: Color(0xFF2B353E),
|
||||
textAlign: TextAlign.start,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.33,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue