Skip to content

Commit

Permalink
🔖 1.0.3+3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
iqfareez committed Aug 31, 2020
1 parent e300d70 commit 641bd96
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
15 changes: 9 additions & 6 deletions lib/AppBody.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:math';

import 'package:bmicalculator/Utils/bmiLegends.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -59,6 +60,8 @@ class _AppBodyState extends State<AppBody> {
duration: Duration(seconds: 2),
);

BmiLegends bmiLegends = BmiLegends();

@override
Widget build(BuildContext context) {
SizeConfig().init(context);
Expand Down Expand Up @@ -178,12 +181,12 @@ class _AppBodyState extends State<AppBody> {
Scaffold.of(context).showSnackBar(snackBar);
} else {
setState(() {
String answer = calculateBMI(
height: heightController.text,
weight: weightController.text)
.toStringAsFixed(1);
calculatedBmi = answer;
bmiResult = answer;
double answer = calculateBMI(
height: heightController.text,
weight: weightController.text);
String answerText = answer.toStringAsFixed(1);
calculatedBmi = bmiLegends.getLegends(answer);
bmiResult = answerText;
});
}
},
Expand Down
6 changes: 3 additions & 3 deletions lib/BMIGauge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _BmiGaugeState extends State<BmiGauge> {
minimum: 10,
maximum: 45,
interval: 6,
minorTicksPerInterval: 9,
minorTicksPerInterval: 10,
showAxisLine: false,
radiusFactor: 0.93,
labelOffset: 2,
Expand All @@ -41,14 +41,14 @@ class _BmiGaugeState extends State<BmiGauge> {
endWidth: 0.265,
color: const Color.fromRGBO(34, 195, 199, 0.75)),
GaugeRange(
startValue: 18.6,
startValue: 18.5,
endValue: 25.0,
startWidth: 0.265,
sizeUnit: GaugeSizeUnit.factor,
endWidth: 0.265,
color: const Color.fromRGBO(123, 199, 34, 0.75)),
GaugeRange(
startValue: 25.1,
startValue: 25.0,
endValue: 30.0,
startWidth: 0.265,
sizeUnit: GaugeSizeUnit.factor,
Expand Down
7 changes: 5 additions & 2 deletions lib/Utils/bmiLegends.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ class BmiLegends {
return _legendsText[1];
else if (value >= 18.5 && value < 25.0)
return _legendsText[2];
else if (value >= 25.0 && value < 35)
else if (value >= 25.0 && value < 30)
return _legendsText[3];
//TODO-sambung
else if (value >= 30 && value < 35)
return _legendsText[4];
else if (value >= 35)
return _legendsText[5];
else
return "Err";
}
Expand Down
8 changes: 6 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MyHomePage extends StatelessWidget {
showAboutDialog(
context: context,
applicationName: 'BMI Calculator Lite',
applicationVersion: '1.0.0+2',
applicationVersion: '1.0.3+3',
applicationIcon: Image.network(
'https://firebasestorage.googleapis.com/v0/b/bmi-flutter-2e776.appspot.com/o/logounnamed%20(Custom).png?alt=media&token=b22b53f7-bfc6-4a9b-89f3-92e681d1fe6c',
width: 50,
Expand All @@ -77,11 +77,15 @@ class MyHomePage extends StatelessWidget {
url:
'https://github.com/fareezMaple/bmi_calculator-Flutter'),
aboutLinkButton(
title: 'Follow me on Twitter',
title: 'Twitter',
url: 'https://twitter.com/iqfareez2'),
aboutLinkButton(
title: 'Open on web',
url: 'https://bmi-flutter-2e776.web.app/'),
aboutLinkButton(
title: 'Release notes',
url:
'https://telegra.ph/Changelogs---BMI-Calculator-Lite-07-21')
]);
},
tooltip: 'View some info',
Expand Down
12 changes: 1 addition & 11 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,7 @@ description: bmi gemok kurus
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+2
version: 1.0.3+3

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit 641bd96

Please sign in to comment.