Now that you know how to make your app look exactly the way you want, it's time to introduce the dart:math library and make your app do exactly what you want in the most efficient and easy way possible.
we're ready to actually write the functionality … and as I mentioned in the beginning, … the design is really the hardest part of this app, … and the functionality of actually calculating … the BMI is in fact the easiest. … Let's get started by creating a new dart file, … which is going to contain the functionality … of calculating the BMI. … and we're also going to pass it a weight. … Now the way that we're going to pass over these properties … is of course when we construct the calculator brain. … So, let's create a constructor … with the height and the weight. … So, now that we have a constructor, … we'll be able to supply the values … for the height and weight when we create … a new object from the calculator brain, … and we can now start writing some of the functionality. … The first thing we'll need is to be able to … calculate the actual BMI. … Now, the BMI stands for the body mass index … and it's a way of normalizing … somebody's weight against their height. … So, the formula for calculating the BMI …
This course was created by London App Brewery. We are pleased to host this content in our library.
- Using Flutter themes
- Refactoring widgets
- Customizing widgets using themes
- Routes and navigating
- Dart maps