Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into code_reafactoring

 Conflicts:
	lib/screens/procedures/ProcedureCard.dart
merge-requests/526/head
hussam al-habibeh 5 years ago
commit 240f70d163

@ -88,8 +88,6 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
String req = json.encode(body);
var asd="";
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,
@ -105,7 +103,8 @@ class BaseAppClient {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],parsed['AndroidLink'],parsed['IOSLink']); helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (!parsed['IsAuthenticated']) { if (!parsed['IsAuthenticated']) {
@ -225,7 +224,8 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],parsed['AndroidLink'],parsed['IOSLink']); helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (parsed['IsAuthenticated'] == null) { if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
@ -289,7 +289,6 @@ class BaseAppClient {
} }
} }
String getError(parsed) { String getError(parsed) {
//TODO change this fun //TODO change this fun
String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']; String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];

@ -18,7 +18,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart';
import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart';
import 'package:doctor_app_flutter/widgets/dashboard/out_patient_stack.dart';
import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart';
import 'package:doctor_app_flutter/widgets/dashboard/swiper_rounded_pagination.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -28,6 +32,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:sticky_headers/sticky_headers/widget.dart';
import '../../routes.dart'; import '../../routes.dart';
import '../../widgets/shared/app_texts_widget.dart'; import '../../widgets/shared/app_texts_widget.dart';
@ -130,10 +135,12 @@ class _HomeScreenState extends State<HomeScreen> {
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: ListView(children: [ body: ListView(children: [
Column( Column(children: <Widget>[
children: <Widget>[ StickyHeader(
SizedBox(height: 20), header: Container(
Stack(children: [ color: Colors.grey[100],
padding: EdgeInsets.only(top: 10),
child: Stack(children: [
IconButton( IconButton(
icon: Image.asset('assets/images/menu.png', icon: Image.asset('assets/images/menu.png',
height: 50, width: 50), height: 50, width: 50),
@ -141,8 +148,7 @@ class _HomeScreenState extends State<HomeScreen> {
color: Colors.black, color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(), onPressed: () => Scaffold.of(context).openDrawer(),
), ),
Column( Column(children: <Widget>[
children: <Widget>[
ProfileWelcomeWidget( ProfileWelcomeWidget(
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -150,7 +156,8 @@ class _HomeScreenState extends State<HomeScreen> {
Container( Container(
width: MediaQuery.of(context).size.width * .6, width: MediaQuery.of(context).size.width * .6,
// // height: 100, // // height: 100,
child: projectsProvider.doctorClinicsList.length > 0 child: projectsProvider.doctorClinicsList.length >
0
? Stack( ? Stack(
children: [ children: [
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
@ -177,7 +184,8 @@ class _HomeScreenState extends State<HomeScreen> {
Container( Container(
padding: EdgeInsets.all(2), padding: EdgeInsets.all(2),
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
decoration: new BoxDecoration( decoration:
new BoxDecoration(
color: Colors.red[800], color: Colors.red[800],
borderRadius: borderRadius:
BorderRadius.circular( BorderRadius.circular(
@ -194,18 +202,21 @@ class _HomeScreenState extends State<HomeScreen> {
.toString(), .toString(),
style: new TextStyle( style: new TextStyle(
color: Colors.white, color: Colors.white,
fontSize: projectsProvider fontSize:
projectsProvider
.isArabic .isArabic
? 10 ? 10
: 11, : 11,
), ),
textAlign: TextAlign.center, textAlign:
TextAlign.center,
), ),
), ),
AppText(item.clinicName, AppText(item.clinicName,
fontSize: 12, fontSize: 12,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight:
FontWeight.bold,
textAlign: TextAlign.end), textAlign: TextAlign.end),
], ],
); );
@ -230,22 +241,19 @@ class _HomeScreenState extends State<HomeScreen> {
)), )),
], ],
) )
: AppText(TranslationBase.of(context).noClinic), : AppText(
TranslationBase.of(context).noClinic),
), ),
], ],
), ),
isClilic: true, isClilic: true,
height: 50,
), ),
])
])),
content: Column(
children: [
Container( Container(
height: MediaQuery.of(context).size.height * 0.24,
),
],
),
Positioned(
right: 9.0,
left: 9,
top: MediaQuery.of(context).size.height * .08,
child: Container(
height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
child: model.dashboardItemsList.length > 0 child: model.dashboardItemsList.length > 0
? new Swiper( ? new Swiper(
@ -279,19 +287,19 @@ class _HomeScreenState extends State<HomeScreen> {
.spaceBetween, .spaceBetween,
children: [ children: [
config.activeIndex == 0 config.activeIndex == 0
? getSwiperPagiantion( ? SwiperRoundedPagination(
true) true)
: getSwiperPagiantion( : SwiperRoundedPagination(
false), false),
config.activeIndex == 1 config.activeIndex == 1
? getSwiperPagiantion( ? SwiperRoundedPagination(
true) true)
: getSwiperPagiantion( : SwiperRoundedPagination(
false), false),
config.activeIndex == 2 config.activeIndex == 2
? getSwiperPagiantion( ? SwiperRoundedPagination(
true) true)
: getSwiperPagiantion( : SwiperRoundedPagination(
false), false),
], ],
))))) )))))
@ -302,8 +310,6 @@ class _HomeScreenState extends State<HomeScreen> {
// control: new SwiperControl(), // control: new SwiperControl(),
) )
: SizedBox()), : SizedBox()),
)
]),
model.dashboardItemsList.length > 0 model.dashboardItemsList.length > 0
? FractionallySizedBox( ? FractionallySizedBox(
widthFactor: 0.90, widthFactor: 0.90,
@ -322,9 +328,11 @@ class _HomeScreenState extends State<HomeScreen> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
model.dashboardItemsList[3].kPIName, model.dashboardItemsList[3]
.kPIName,
fontSize: fontSize:
SizeConfig.textMultiplier * 2.2, SizeConfig.textMultiplier *
2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
], ],
@ -342,13 +350,14 @@ class _HomeScreenState extends State<HomeScreen> {
.height * .height *
0.20, 0.20,
child: new ListView( child: new ListView(
scrollDirection: Axis.horizontal, scrollDirection:
Axis.horizontal,
children: new List.generate( children: new List.generate(
model model
.dashboardItemsList[3] .dashboardItemsList[3]
.summaryoptions .summaryoptions
.length, (int index) { .length, (int index) {
return getActivityButton(model return GetActivityButton(model
.dashboardItemsList[3] .dashboardItemsList[3]
.summaryoptions[index]); .summaryoptions[index]);
}))) })))
@ -364,8 +373,8 @@ class _HomeScreenState extends State<HomeScreen> {
AppText( AppText(
model.dashboardItemsList[6] model.dashboardItemsList[6]
.kPIName, .kPIName,
fontSize: fontSize: SizeConfig
SizeConfig.textMultiplier * .textMultiplier *
2.2, 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -384,15 +393,19 @@ class _HomeScreenState extends State<HomeScreen> {
.height * .height *
0.20, 0.20,
child: new ListView( child: new ListView(
scrollDirection: scrollDirection: Axis
Axis.horizontal, .horizontal,
children: new List.generate( children: new List
.generate(
model model
.dashboardItemsList[6] .dashboardItemsList[
6]
.summaryoptions .summaryoptions
.length, (int index) { .length,
return getActivityButton(model (int index) {
.dashboardItemsList[6] return GetActivityButton(model
.dashboardItemsList[
6]
.summaryoptions[index]); .summaryoptions[index]);
}))) })))
], ],
@ -406,8 +419,8 @@ class _HomeScreenState extends State<HomeScreen> {
AppText( AppText(
model.dashboardItemsList[4] model.dashboardItemsList[4]
.kPIName, .kPIName,
fontSize: fontSize: SizeConfig
SizeConfig.textMultiplier * .textMultiplier *
2.2, 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -426,15 +439,19 @@ class _HomeScreenState extends State<HomeScreen> {
.height * .height *
0.20, 0.20,
child: new ListView( child: new ListView(
scrollDirection: scrollDirection: Axis
Axis.horizontal, .horizontal,
children: new List.generate( children: new List
.generate(
model model
.dashboardItemsList[4] .dashboardItemsList[
4]
.summaryoptions .summaryoptions
.length, (int index) { .length,
return getActivityButton(model (int index) {
.dashboardItemsList[4] return GetActivityButton(model
.dashboardItemsList[
4]
.summaryoptions[index]); .summaryoptions[index]);
}))) })))
], ],
@ -463,7 +480,8 @@ class _HomeScreenState extends State<HomeScreen> {
width: 150, width: 150,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context).patients, TranslationBase.of(context).patients,
@ -521,7 +539,8 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => PatientReferralScreen(), builder: (context) =>
PatientReferralScreen(),
// MyReferredPatient(), // MyReferredPatient(),
), ),
); );
@ -556,7 +575,8 @@ class _HomeScreenState extends State<HomeScreen> {
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed(PATIENTS, arguments: { .pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm":
_patientSearchFormValues,
"selectedType": "7", "selectedType": "7",
"arrivalType": "1" "arrivalType": "1"
}); });
@ -623,6 +643,8 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
], ],
), ),
)
]),
]), ]),
), ),
); );
@ -671,12 +693,9 @@ class _HomeScreenState extends State<HomeScreen> {
projectID: doctorProfile.projectID, projectID: doctorProfile.projectID,
tokenID: '', tokenID: '',
languageID: 2); languageID: 2);
// authProvider.getDocProfiles(docInfo)
authProvider.getDocProfiles(docInfo.toJson()).then((res) async { authProvider.getDocProfiles(docInfo.toJson()).then((res) async {
changeIsLoading(false); changeIsLoading(false);
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
// model.getDashboard();
}).catchError((err) { }).catchError((err) {
changeIsLoading(false); changeIsLoading(false);
Helpers.showErrorToast(err); Helpers.showErrorToast(err);
@ -696,135 +715,6 @@ class _HomeScreenState extends State<HomeScreen> {
return value.toString(); return value.toString();
} }
Widget getActivityButton(value) {
return Container(
width: MediaQuery.of(context).size.width * 0.24,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
height: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.15
: MediaQuery.of(context).size.height * 0.20,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.all(10),
child: AppText(value.value.toString(),
fontSize: 28, fontWeight: FontWeight.bold)),
Expanded(
child: AppText(
value.kPIParameter,
textOverflow: TextOverflow.clip,
fontSize: 12,
textAlign: TextAlign.center,
),
),
],
),
);
}
Widget dot(Color c) {
return Container(
padding: EdgeInsets.all(5.0),
margin: EdgeInsets.all(5.0),
decoration: BoxDecoration(color: c, shape: BoxShape.circle));
}
Widget rowCount(name, int count, Color c) {
return Row(
children: [
dot(c),
Padding(
padding: EdgeInsets.only(top: 5, bottom: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
name,
color: Colors.black,
textAlign: TextAlign.center,
fontSize: 12,
textOverflow: TextOverflow.ellipsis,
),
AppText(
' (' + count.toString() + ')',
color: Colors.black,
textAlign: TextAlign.center,
fontSize: 14,
fontWeight: FontWeight.bold,
)
],
)),
],
);
}
Widget getOutPatientStack(value) {
value.summaryoptions
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
var list = new List<Widget>();
value.summaryoptions.forEach((result) =>
{list.add(getStack(result, value.summaryoptions.first.value))});
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
AppText(
value.kPIName,
medium: true,
),
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list)
],
);
}
getStack(Summaryoptions value, max) {
return Stack(children: [
Container(
height: 150,
margin: EdgeInsets.all(5),
width: 40,
child: SizedBox(),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
),
Positioned(
bottom: 0,
child: Container(
child: SizedBox(),
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(10),
height: max != 0 ? (150 * value.value) / max : 0,
width: 40,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.red[300]))),
Container(
height: 150,
margin: EdgeInsets.only(left: 5, top: 5),
padding: EdgeInsets.all(10),
child: RotatedBox(
quarterTurns: 1,
child: Center(
child: Align(
child: AppText(
value.kPIParameter + ' (' + value.value.toString() + ') ',
fontSize: 10,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
)),
),
))
]);
}
List<Widget> getSwipeWidget(model) { List<Widget> getSwipeWidget(model) {
return [ return [
RoundedContainer( RoundedContainer(
@ -832,13 +722,13 @@ class _HomeScreenState extends State<HomeScreen> {
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[1]))), child: GetOutPatientStack(model.dashboardItemsList[1]))),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[0]))), child: GetOutPatientStack(model.dashboardItemsList[0]))),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
@ -892,19 +782,19 @@ class _HomeScreenState extends State<HomeScreen> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
rowCount( RowCounts(
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[0].kPIParameter, .summaryoptions[0].kPIParameter,
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[0].value, .summaryoptions[0].value,
Colors.black), Colors.black),
rowCount( RowCounts(
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[1].kPIParameter, .summaryoptions[1].kPIParameter,
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[1].value, .summaryoptions[1].value,
Colors.grey), Colors.grey),
rowCount( RowCounts(
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[2].kPIParameter, .summaryoptions[2].kPIParameter,
model.dashboardItemsList[2] model.dashboardItemsList[2]
@ -942,21 +832,4 @@ class _HomeScreenState extends State<HomeScreen> {
])), ])),
]; ];
} }
getSwiperPagiantion(active) {
return active == true
? Container(
height: 5,
width: 30,
// margin: EdgeInsets.only(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), color: Colors.black),
)
: Container(
height: 5,
width: 8,
margin: EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.grey));
}
} }

@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'file:///C:/Users/admin/AndroidStudioProjects/doctor_app_flutter/lib/widgets/shared/buttons/secondary_button.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/secondary_button.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';

@ -44,6 +44,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
appBarTitle: TranslationBase.of(context).vitalSign, appBarTitle: TranslationBase.of(context).vitalSign,
body: mode.patientVitalSignsHistory.length > 0 body: mode.patientVitalSignsHistory.length > 0
? Column( ? Column(
children: [
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
@ -70,7 +74,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.height * 0.23, height: MediaQuery.of(context).size.height * 0.23,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
margin: EdgeInsets.symmetric(horizontal: 16.0), margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
color: Colors.white, color: Colors.white,
@ -274,13 +278,13 @@ class VitalSignDetailsScreen extends StatelessWidget {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 8.0), margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 4),
child: GridView.count( child: GridView.count(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 4, crossAxisSpacing: 6,
mainAxisSpacing: 4, mainAxisSpacing: 6,
childAspectRatio: 1 / 1.0, childAspectRatio: 1.0 / 1.0,
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
InkWell( InkWell(
@ -443,6 +447,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
), ),
), ),
], ],
),
),
),
],
) )
: Center( : Center(
child: Column( child: Column(

@ -55,14 +55,18 @@ class VitalSignItem extends StatelessWidget {
margin: 0, margin: 0,
), ),
Expanded( Expanded(
child: AppText( child: Column(
children: [
AppText(
"$unit", "$unit",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.2, fontSize: SizeConfig.textMultiplier * 1.2,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: HexColor('#B8382C'), color: Color(0xFFB8382C),
margin: 0, margin: 0,
), ),
],
),
), ),
], ],
), ),

@ -164,7 +164,7 @@ class ProcedureCard extends StatelessWidget {
), ),
], ],
), ),
Container( /*Container(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
@ -184,7 +184,7 @@ class ProcedureCard extends StatelessWidget {
color: Colors.blue, color: Colors.blue,
), ),
), ),
), ),*/
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

@ -252,7 +252,8 @@ class AddSickLeavScreen extends StatelessWidget {
Image.asset('assets/images/no-data.png'), Image.asset('assets/images/no-data.png'),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AppText('No Sick Leave Found'), child: AppText(
TranslationBase.of(context).noSickLeave),
) )
], ],
), ),

@ -5,19 +5,14 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class ShowSickLeaveScreen extends StatelessWidget { class ShowSickLeaveScreen extends StatelessWidget {
PatiantInformtion patient; PatiantInformtion patient;
@ -32,6 +27,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient,
routeArgs['patientType'] ?? "0", routeArgs['patientType'] ?? "0",
@ -42,7 +38,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
children: [ children: [
// PatientProfileHeaderNewDesign( // PatientProfileHeaderNewDesign(
// patient, routeArgs['patientType'], routeArgs['arrivalType']), // patient, routeArgs['patientType'], routeArgs['arrivalType']),
Column( model.getAllSIckLeave.length > 0
? Column(
children: model.getAllSIckLeave children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) { .map<Widget>((GetAllSickLeaveResponse item) {
return RoundedContainer( return RoundedContainer(
@ -77,7 +74,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
padding: EdgeInsets.all(3), padding: EdgeInsets.all(3),
child: AppText( child: AppText(
item.status == 1 item.status == 1
? TranslationBase.of(context) ? TranslationBase.of(
context)
.hold .hold
: item.status == 2 : item.status == 2
? TranslationBase.of( ? TranslationBase.of(
@ -96,7 +94,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
), ),
Row( Row(
children: [ children: [
AppText(TranslationBase.of(context) AppText(TranslationBase.of(
context)
.daysSickleave), .daysSickleave),
AppText( AppText(
item.noOfDays.toString(), item.noOfDays.toString(),
@ -123,7 +122,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment
.spaceBetween,
children: [ children: [
AppText( AppText(
item.remarks ?? "", item.remarks ?? "",
@ -135,7 +135,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
// color: Colors.green, //Colors.black, // color: Colors.green, //Colors.black,
onPressed: () => { onPressed: () => {
if (item.status == 1) if (item.status ==
1)
{ {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of( TranslationBase.of(
@ -168,6 +169,22 @@ class ShowSickLeaveScreen extends StatelessWidget {
)); ));
}).toList(), }).toList(),
) )
: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noSickLeave),
)
],
),
)
], ],
), ),
), ),

@ -0,0 +1,39 @@
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: 120,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
height: 120,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.all(10),
child: AppText(value.value.toString(),
fontSize: 28, fontWeight: FontWeight.bold)),
Expanded(
child: AppText(
value.kPIParameter,
textOverflow: TextOverflow.clip,
fontSize: 12,
textAlign: TextAlign.center,
fontWeight: FontWeight.w600,
),
),
],
),
);
}
}

@ -0,0 +1,68 @@
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class GetOutPatientStack extends StatelessWidget {
final value;
GetOutPatientStack(this.value);
@override
Widget build(BuildContext context) {
value.summaryoptions
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
var list = new List<Widget>();
value.summaryoptions.forEach((result) =>
{list.add(getStack(result, value.summaryoptions.first.value))});
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
AppText(
value.kPIName,
medium: true,
),
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list)
],
);
}
getStack(Summaryoptions value, max) {
return Stack(children: [
Container(
height: 150,
margin: EdgeInsets.all(5),
width: 40,
child: SizedBox(),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
),
Positioned(
bottom: 0,
child: Container(
child: SizedBox(),
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(10),
height: max != 0 ? (150 * value.value) / max : 0,
width: 40,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.red[300]))),
Container(
height: 150,
margin: EdgeInsets.only(left: 5, top: 5),
padding: EdgeInsets.all(10),
child: RotatedBox(
quarterTurns: 1,
child: Center(
child: Align(
child: AppText(
value.kPIParameter + ' (' + value.value.toString() + ') ',
fontSize: 10,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
)),
),
))
]);
}
}

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class RowCounts extends StatelessWidget {
final name;
final int count;
final Color c;
RowCounts(this.name, this.count, this.c);
@override
Widget build(BuildContext context) {
return Row(
children: [
dot(c),
Padding(
padding: EdgeInsets.only(top: 5, bottom: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
name,
color: Colors.black,
textAlign: TextAlign.center,
fontSize: 12,
textOverflow: TextOverflow.ellipsis,
),
AppText(
' (' + count.toString() + ')',
color: Colors.black,
textAlign: TextAlign.center,
fontSize: 14,
fontWeight: FontWeight.bold,
)
],
)),
],
);
}
Widget dot(Color c) {
return Container(
padding: EdgeInsets.all(5.0),
margin: EdgeInsets.all(5.0),
decoration: BoxDecoration(color: c, shape: BoxShape.circle));
}
}

@ -0,0 +1,24 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class SwiperRoundedPagination extends StatelessWidget {
final active;
SwiperRoundedPagination(this.active);
@override
Widget build(BuildContext context) {
return active == true
? Container(
height: 5,
width: 30,
// margin: EdgeInsets.only(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), color: Colors.black),
)
: Container(
height: 5,
width: 8,
margin: EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.grey));
}
}

@ -32,7 +32,7 @@ class AppText extends StatefulWidget {
AppText( AppText(
this.text, { this.text, {
this.color = Colors.black, this.color = Colors.black,
this.fontWeight = FontWeight.normal, this.fontWeight,
this.variant, this.variant,
this.fontSize, this.fontSize,
this.fontFamily = 'Poppins', this.fontFamily = 'Poppins',

@ -107,7 +107,7 @@ class _AppButtonState extends State<AppButton> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: color:
widget.hasBorder ? widget.borderColor : widget.color, widget.hasBorder ? widget.borderColor : widget.color ?? Color(0xFFB8382C),
width: 0.8, width: 0.8,
), ),
borderRadius: BorderRadius.all(Radius.circular(widget.radius))), borderRadius: BorderRadius.all(Radius.circular(widget.radius))),

@ -901,6 +901,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.1"
sticky_headers:
dependency: "direct main"
description:
name: sticky_headers
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.8+1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:

@ -78,7 +78,7 @@ dependencies:
# Flutter Html View # Flutter Html View
flutter_html: 1.0.2 flutter_html: 1.0.2
sticky_headers: "^0.1.8"
#speech to text #speech to text

Loading…
Cancel
Save