Skip to content

BMI Calculator App that measures Body Mass Index (BMI) table with decimal precision based on your height, age and sex using Flutter with custom-widgets ⚖

License

Notifications You must be signed in to change notification settings

ladulab/flutter-bmi-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Banner Project Banner

BMI Calculator App

An BMI Calculator App that measures your Body Mass Index with decimal precision!

contributors last update forks stars open issues license


📔 Table of Contents

🌟 About the Project


BMI Calculator App is an Body Mass Index (BMI) calculator that measures your BMI table with decimal precision based on your height, age and sex using custom widgets in flutter ⚖

‼️ Folder Structure

Here is the code folder structure.

bmicalc/
|- android
|- ios
|- lib/
  |-- components/
  |-- screens/
  |-- calculator_brain.dart
  |-- constants.dart
  |-- main.dart

Now, lets dive into the lib folder which has the main code for the application.

components

bottom_button.dart - icon_content.dart - reusable_card.dart - rounded_icon_button.dart

This folder houses all the components listed above which they are custom flutter widgets with beautiful customized theme using Composition and Inheritance.

screens (activities)

input_page.dart - This code implementing the UI (User Interface) of the calculator screen, where the user need to provide necessary information for calculating user's BMI. Take a look of this activity at About The Project section.

results_page.dart - This code implementing the UI (User Interface) of the results screen, there the user is shown his BMI, a classification group, a customized message and the standard BMI range. Take a look at this activity at About The Project section.

lib

calculator_brain.dart - This code implementing the CalculatorBrain class, where the necessary calculations and conditionals are performed to provide a result to the user that contains the BMI, group classification and interpretation.

Method for calculating BMI:

String calculateBMI() {
  _bmi = weight / pow(height / 100, 2);
  return _bmi.toStringAsFixed(1); // converts this _bmi to a double before computing the string representation, as by toDouble - with exactly {fractionDigits} digits after the decimal point
}

Formula for calculating BMI: $\frac{weight}{height^2}$

constants.dart - All the application level constants. Specifically, this constants.dart file contains theme classes for app widgets.


👾 Tech Stack

Dart Flutter Android Studio

(back to top)

🧰 Getting Started

⚙️ Installation

Step 1:

Download or clone this repo by using the link below:

 https://github.com/ladunjexa/bmi-calculator-app

Step 2:

Go to project root and execute the following command in console to get the required dependencies:

  flutter pub get

🏃 Run Locally

Clone the project

  git clone https://github.com/ladunjexa/bmi-calculator-app

Go to the project directory

  cd bmi-calculator-app

Install dependencies

  flutter pub get

Start the application

  flutter run

(back to top)

👋 Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

⚠️ License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

🤝 Contact

Liron Abutbul - @lironabutbul6 - @ladunjexa

Project Link: https://github.com/ladunjexa/bmi-calculator-app

(back to top)

💎 Acknowledgements

This section used to mention useful resources and libraries that used in BMI Calculator App project.

(back to top)

About

BMI Calculator App that measures Body Mass Index (BMI) table with decimal precision based on your height, age and sex using Flutter with custom-widgets ⚖

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published