Coder Social home page Coder Social logo

ladulab / flutter-bmi-calculator Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.27 MB

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: MIT License

Java 2.58% Kotlin 0.65% Shell 2.84% Swift 2.09% Objective-C 3.21% Dart 88.62%
android bmi bmi-calculator dart flutter ios mobile-app

flutter-bmi-calculator's Introduction

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)

flutter-bmi-calculator's People

Contributors

ladunjexa avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.