-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iNcrease dart sdk, UI overhauls, function optimization
- Loading branch information
Showing
17 changed files
with
492 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
enum BmiEnums { | ||
severlyUnderweight("Serverly Underweight", null, 16), | ||
underweight("Underweight", 16, 18.5), | ||
normal("Normal", 18.5, 25), | ||
overweight("Overweight", 25, 30), | ||
moderatelyObese("Moderately Obese", 30, 35), | ||
severelyObese( | ||
"Severely Obese", 35, null); // max value is jus a very large value | ||
|
||
const BmiEnums(this.description, this.min, this.max); | ||
final String description; | ||
final double? min; | ||
final double? max; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class BmiUtils { | ||
/// a function that takes weight and height and return BMI value | ||
static double calculateBmi(double height, double weight) { | ||
return weight / (height * height); | ||
} | ||
|
||
/// TODO; BMI value validator | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:fluttertoast/fluttertoast.dart'; | ||
import 'package:url_launcher/url_launcher.dart'; | ||
|
||
class LinkLauncher { | ||
/// launch the given url | ||
static void launch(String url) async { | ||
if (!await launchUrl(Uri.parse(url))) { | ||
Fluttertoast.showToast( | ||
msg: "Cannot launch url $url", backgroundColor: Colors.red); | ||
} | ||
} | ||
} |
Oops, something went wrong.