https://github.com/panditsamik/bmi-calculator
https://github.com/panditsamik/bmi-calculator
dart flutter slider-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/panditsamik/bmi-calculator
- Owner: panditsamik
- Created: 2023-03-02T16:24:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T17:16:27.000Z (over 3 years ago)
- Last Synced: 2025-08-01T12:14:16.881Z (11 months ago)
- Topics: dart, flutter, slider-plugin
- Language: Dart
- Homepage:
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BMI Calculator
### The BMI calculator uses technology to determine if a person is underweight, overweight or obese.
### BMI = weight (kg) / height^2
### The BMI calculator uses smart technology to help people decide if they are underweight, overweight, obese or in the normal category.
#### The body weight values (kg/m2) for adults (men and women above 18 years of age) are:
- Underweight - less than 18.5
- Normal- 18.5 - 25
- Overweight - 25 - 30
- Obese - above 30
## Documentation and References :
[Link](https://pub.dev/packages/font_awesome_flutter#font_awesome_flutter)
#### The free Font Awesome Icon pack available as set of Flutter Icons - based on font awesome version 6.2.1.
#### This icon pack includes only the free icons offered by Font Awesome out-of-the-box.
## Installation:
#### Use this package as a library
#### Depend on it
#### Run this command:
#### With Flutter:
```
flutter pub add font_awesome_flutter
```
#### This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
```
dependencies:
font_awesome_flutter: ^10.4.0
```
#### Import it
#### Now in your Dart code, you can use:
```
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
```
## Slider Widget
#### The easy way is to get the actual SliderTheme used in your context and modify only the properties you need. For example, to modify one slide:
```
SliderTheme(
data: SliderTheme.of(context).copyWith(
activeTrackColor: const Color(0xFF28afb0),
inactiveTrackColor: const Color(0xFFadb5bd),
thumbColor: const Color(0xFF28afb0),
overlayColor: const Color(0xFFaecae2),
thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 15.0),
overlayShape: const RoundSliderOverlayShape(overlayRadius: 30.0),
),
child: Slider(
value: height.toDouble(),
min: 120.0,
max: 320.0,
onChanged: (double newValue) {
setState(() {
height = newValue.round();
});
},
),
),
```
## Navigate to a new screen and back
[Link](https://docs.flutter.dev/cookbook/navigation/navigation-basics)
### Navigate to the second route using Navigator.push()
To switch to a new route, use the Navigator.push() method. The push() method adds a Route to the stack of routes managed by the Navigator. Where does the Route come from? You can create your own, or use a MaterialPageRoute, which is useful because it transitions to the new route using a platform-specific animation.
In the build() method of the FirstRoute widget, update the onPressed() callback:
```
// Within the `FirstRoute` widget
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SecondRoute()),
);
}
```
### Return to the first route using Navigator.pop()
The pop() method removes the current Route from the stack of routes managed by the Navigator.
To implement a return to the original route, update the onPressed() callback in the SecondRoute widget:
```
// Within the SecondRoute widget
onPressed: () {
Navigator.pop(context);
}
```
# Screenshots:



# Video:
https://user-images.githubusercontent.com/91545371/222502799-4d92e680-47e5-46ca-b90e-f6946a7a086e.mp4