Merge branch 'fix-bugs' into 'development'

fix bugs

See merge request Cloud_Solution/diplomatic-quarter!331
merge-requests/332/merge
Mohammad Aljammal 3 years ago
commit 4ac6bf628b

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -6,8 +6,10 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dart:math';
import '../health_calc_desc.dart';
import 'result_page.dart';
const activeCardColor = Color(0xff70777A);
@ -121,7 +123,25 @@ class _BMICalculatorState extends State<BMICalculator> {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
showHomeAppBarIcon: false,
appBarIcons: [
IconButton(
icon: Icon(Icons.info_outline),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HealthDescPage(
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
TranslationBase.of(context).bmiCalcDesc,
"assets/images/AlHabibMedicalService/health_calculator/bmi.png")),
);
},
)
],
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@ -158,7 +178,8 @@ class _BMICalculatorState extends State<BMICalculator> {
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -179,7 +200,8 @@ class _BMICalculatorState extends State<BMICalculator> {
Container(
height: 38.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
@ -261,15 +283,18 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
offset:
Offset(0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).cm)),
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(
child: Texts(TranslationBase.of(context).cm)),
),
),
),
@ -290,13 +315,16 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
offset:
Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).feet)),
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(
child: Texts(TranslationBase.of(context).feet)),
),
),
),
@ -328,7 +356,8 @@ class _BMICalculatorState extends State<BMICalculator> {
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -349,7 +378,8 @@ class _BMICalculatorState extends State<BMICalculator> {
Container(
height: 38.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
@ -431,15 +461,18 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
offset:
Offset(0, 3), // changes position of shadow
),
],
color: kgCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).kg)),
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(
child: Texts(TranslationBase.of(context).kg)),
),
),
),
@ -460,13 +493,17 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
offset:
Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).pound)),
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(
child:
Texts(TranslationBase.of(context).pound)),
),
),
),

@ -0,0 +1,40 @@
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class HealthDescPage extends StatelessWidget {
final String title;
final String desc;
final String icon;
HealthDescPage(this.title, this.desc, this.icon);
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: title,
body: Container(
margin: EdgeInsets.all(8.0),
child: Row(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Image.asset(
icon,
fit: BoxFit.cover,
height: 80,
),
),
Expanded(
child: Text(
desc,
style: TextStyle(fontSize: 18.0),
),
)
],
),
),
);
}
}

@ -558,7 +558,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeIndex: _changeCurrentTab,
index: currentTab,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked ,
floatingActionButton:
(projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton(

@ -444,6 +444,7 @@ class Utils {
),
));
// TODO mosa check it
medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',

@ -97,14 +97,22 @@ class _BottomNavBarState extends State<BottomNavBar> {
),
if (widget.index != 0 && projectViewModel.havePrivilege(34))
BottomNavigationItem(
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar,
icon: Icons.home_outlined,
activeIcon: Icons.home_outlined,
changeIndex: _changeIndex,
index: _index,
currentIndex: 2,
name: TranslationBase.of(context).bookAppo,
index: widget.index,
currentIndex: 0,
name: TranslationBase.of(context).home,
),
if (widget.index == 0 && projectViewModel.havePrivilege(34))
// BottomNavigationItem(
// icon: EvaIcons.calendar,
// activeIcon: EvaIcons.calendar,
// changeIndex: _changeIndex,
// index: _index,
// currentIndex: 2,
// name: TranslationBase.of(context).bookAppo,
// ),
if (/*widget.index == 0 && */projectViewModel.havePrivilege(34))
BottomNavigationItem(
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar,

@ -217,6 +217,7 @@ flutter:
- assets/images/svg/
- assets/tracker/
- assets/images/AlHabibMedicalService/
- assets/images/AlHabibMedicalService/health_calculator/
- assets/images/pharmacy_module/
- assets/images/gif/
- assets/images/pharmacy_module/payment/

Loading…
Cancel
Save