Skip to content

CarlosAlbertoTI/BMI-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BMI Calculator App

A Flutter App calculate your body mass index (BMI).

Table of contents

General info

My intention in creating this app was understating how the widgets work in Flutter and how can you structured the application. Also, learn more about Flutter.

Screenshots

First Page Second Page

Files

The file Components have all the reusable widgets that I use on the screens.

| Components
|---- buttom_bottom.dart
|---- icon_content.dart
|---- reasuble_card.dart
|---- round_icon_buttom.dart
| Screens
|---- input_page.dart
|---- result._page.dart
|-----calculator.dart
| calculator_brain.dart
| constants.dart
| main.dart

Technologies

  • Dart - version 2.8.0
  • Flutter

Packages

  • font_awesome_flutter
    • version: 8.5.0

How to use the reusable widgets

Component Description
BottomButtom It´s a StatelessWidget that requires a Function (onTap) to execute as a callback and String (buttomTitle)
ReusableCard It´s a StatelessWidget that requires a Function (onPress) to execute as a callback, a Widget (cardChild) to choose which widget put inside the gestureDetector .And at last a Color(colour)
IconContent It´s a StatelessWidget that requires a String (textIcon) and a IconData(iconButtom)
RoundIconButton It´s a StatelessWidget that requires a Function (changeWeight) and a IconData(icon)

How it works?

Well, let´s start with the calculator_brain.dart, there I created a class CalculatorBrain that receives two parameters height and weight and with them, calc the BMI. The CalculatorBrain also has the methods 'getInterpretation and getResults' for return a message to the user and the result of the calc like 'Normal or Overweight'.

Setup

If you´re using the android studio code, and already install the Dart and Flutter on your SO and the plugins on android studio, just open the android studio and click on Check out project from Version Control and choose the option Git. After that, on the input called URL paste the URL of this project and click Clone. When you open the project, you must import the dependencies before running the project. After that, just choose your device and click Run

About

A Flutter App to calculate your Body mass index (BMI)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published