|
|
|
@ -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)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|