Merge branch 'Jul_fixes' into 'development'

Jul fixes

See merge request Cloud_Solution/diplomatic-quarter!322
merge-update-with-lab-changes
Sultan khan 5 years ago
commit 15f620d720

@ -22,7 +22,7 @@ class VaccineViewModel extends BaseViewModel {
await _vaccineService.getMyVaccine(); await _vaccineService.getMyVaccine();
if (_vaccineService.hasError) { if (_vaccineService.hasError) {
error = _vaccineService.error; error = _vaccineService.error;
setState(ViewState.ErrorLocal); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -292,7 +292,9 @@ class MobileNumberTextFiled extends StatelessWidget {
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), color: Colors.white), borderRadius: BorderRadius.circular(15), color: Colors.white),
child: Row(children: <Widget>[ child: Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: Icon( child: Icon(

@ -416,7 +416,7 @@ class _HomePageState extends State<HomePage> {
height: 40, height: 40,
), ),
Texts( Texts(
"${model.heightCm}", "${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white, color: Colors.white,
fontSize: 17, fontSize: 17,
) )
@ -434,7 +434,7 @@ class _HomePageState extends State<HomePage> {
width: 25, width: 25,
height: 40, height: 40,
), ),
Texts('${model.weightKg}', Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, color: Colors.white,
fontSize: 17) fontSize: 17)
], ],
@ -445,8 +445,6 @@ class _HomePageState extends State<HomePage> {
), ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/blood_icon.png', 'assets/images/blood_icon.png',
@ -456,6 +454,7 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
'${model.booldType}', '${model.booldType}',
color: Colors.white, color: Colors.white,
fontSize: 17
) )
], ],
), ),

@ -27,7 +27,7 @@ class LineChartCurved extends StatelessWidget {
getYaxix(); getYaxix();
calculateMaxAndMin(); calculateMaxAndMin();
return AspectRatio( return AspectRatio(
aspectRatio: 1.1, aspectRatio: 1.0,
child: Container( child: Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
@ -80,14 +80,6 @@ class LineChartCurved extends StatelessWidget {
} }
getYaxix() { getYaxix() {
// int indexess= (timeSeries.length*0.30).toInt();
// for (int index = 0; index < timeSeries.length; index++) {
// int mIndex = indexess * index;
// if (mIndex < timeSeries.length) {
// yAxixs.add(timeSeries[mIndex].sales);
// }
// }
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexes * index; int mIndex = indexes * index;
if (mIndex < timeSeries.length) { if (mIndex < timeSeries.length) {
@ -181,7 +173,7 @@ class LineChartCurved extends StatelessWidget {
minX: minX, minX: minX,
maxX: maxX, maxX: maxX,
maxY: maxY, maxY: maxY,
minY: minY, minY: 0,
lineBarsData: getData(context), lineBarsData: getData(context),
); );
} }

@ -31,8 +31,8 @@ class _MyVaccinesState extends State<MyVaccines> {
builder: (BuildContext context, VaccineViewModel model, Widget child) => builder: (BuildContext context, VaccineViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).myVaccines,
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
body: Container( body: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004, left: SizeConfig.screenWidth * 0.004,
@ -68,11 +68,15 @@ class _MyVaccinesState extends State<MyVaccines> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets
horizontal: 20.0, .symmetric(
horizontal:
20.0,
vertical: 20.0), vertical: 20.0),
child: Image.network( child: Image.network(
model.vaccineList[index] model
.vaccineList[
index]
.doctorImageURL, .doctorImageURL,
height: SizeConfig height: SizeConfig
.imageSizeMultiplier * .imageSizeMultiplier *
@ -91,12 +95,17 @@ class _MyVaccinesState extends State<MyVaccines> {
child: Container( child: Container(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: <Widget>[ children: <Widget>[
Text( Text(
model.vaccineList[index] model
.vaccineList[
index]
.doctorTitle + .doctorTitle +
model.vaccineList[index] model
.vaccineList[
index]
.doctorName, .doctorName,
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
@ -106,7 +115,9 @@ class _MyVaccinesState extends State<MyVaccines> {
), ),
SizedBox(height: 7.0), SizedBox(height: 7.0),
Text( Text(
model.vaccineList[index] model
.vaccineList[
index]
.projectName, .projectName,
style: TextStyle( style: TextStyle(
fontSize: 17.0, fontSize: 17.0,
@ -115,7 +126,9 @@ class _MyVaccinesState extends State<MyVaccines> {
), ),
SizedBox(height: 7.0), SizedBox(height: 7.0),
Text( Text(
model.vaccineList[index] model
.vaccineList[
index]
.vaccineName, .vaccineName,
style: TextStyle( style: TextStyle(
fontSize: 17.0, fontSize: 17.0,
@ -125,7 +138,8 @@ class _MyVaccinesState extends State<MyVaccines> {
Text( Text(
'Date Taken ' + 'Date Taken ' +
convertDateFormat(model convertDateFormat(model
.vaccineList[index] .vaccineList[
index]
.invoiceDate), .invoiceDate),
style: TextStyle( style: TextStyle(
fontSize: 17.0), fontSize: 17.0),
@ -151,7 +165,8 @@ class _MyVaccinesState extends State<MyVaccines> {
], ],
), ),
), ),
bottomSheet: Container( bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0
? Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25, height: MediaQuery.of(context).size.height * 0.25,
@ -170,7 +185,8 @@ class _MyVaccinesState extends State<MyVaccines> {
// height: 80.0, // height: 80.0,
child: Button( child: Button(
disabled: true, disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability, label: TranslationBase.of(context)
.checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4), backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, FadePage(page: MyVaccinesItemPage())), context, FadePage(page: MyVaccinesItemPage())),
@ -195,7 +211,8 @@ class _MyVaccinesState extends State<MyVaccines> {
), ),
], ],
), ),
), )
: Container(height: 0,),
), ),
); );
} }

Loading…
Cancel
Save