Skip to content

sivakanth1/BMI-Calculator-Using-Flutter

Repository files navigation

BMI Calculator 📱

A beautiful and functional BMI (Body Mass Index) Calculator mobile application built with Flutter. This app helps users calculate their BMI and provides health interpretations based on the results.

📋 Features

  • Gender Selection: Choose between Male and Female with intuitive tap-to-select cards
  • Height Input: Smooth slider control to select height (120cm - 220cm)
  • Weight & Age Input: Easy increment/decrement buttons for precise values
  • BMI Calculation: Accurate BMI calculation using the standard formula
  • Health Interpretation: Get instant feedback on your BMI results:
    • Underweight (BMI ≤ 18.5)
    • Normal (BMI 18.5 - 25)
    • Overweight (BMI ≥ 25)
  • Dark Theme UI: Modern, sleek dark theme design
  • Ad Integration: Monetized with Google Mobile Ads

🎨 Design

The app features a modern dark theme with:

  • Primary color: #0A0E21
  • Active card color: #1D1E33
  • Accent color: #EB1555
  • Responsive and intuitive UI/UX

🚀 Getting Started

Prerequisites

  • Flutter SDK (>=2.17.0 <3.0.0)
  • Dart SDK
  • Android Studio / VS Code with Flutter extensions
  • A mobile device or emulator

Installation

  1. Clone the repository
    git clone https://github.com/sivakanth1/BMI-Calculator-Using-Flutter.git
    cd BMI-Calculator-Using-Flutter
  2. Install dependencies
    flutter pub get
  3. Run the app
    flutter run

Configuration

To enable Google Mobile Ads:

  1. Add your AdMob App ID in the platform-specific files
  2. Update the ad unit IDs in lib/ad_helper.dart

📦 Dependencies

  • flutter: Core Flutter SDK
  • cupertino_icons: iOS-style icons
  • font_awesome_flutter: Font Awesome icons for gender selection
  • google_mobile_ads: Ad monetization

🏗️ Project Structure

lib/
├── main.dart                         # App entry point
├── calculator_brain.dart             # BMI calculation logic
├── constants.dart                    # App-wide constants & styles
├── ad_helper.dart                    # Ad configuration helper
├── screens/
│   ├── input_page.dart              # Main input screen
│   └── results_page.dart            # Results display screen
└── components/
    ├── reusable_card.dart           # Custom card widget
    ├── icon_content.dart            # Icon with label widget
    ├── bottom_button.dart           # Large bottom button
    └── round_icon_button.dart       # Circular +/- buttons

🧮 BMI Calculation Formula

BMI = weight (kg) / [height (m)]²

🎯 How to Use

  1. Select your gender (Male/Female)
  2. Adjust your height using the slider
  3. Set your weight using the +/- buttons
  4. Set your age using the +/- buttons
  5. Tap the "CALCULATE" button
  6. View your BMI result and health interpretation
  7. Tap "RE-CALCULATE" to start over

🛠️ Built With

📄 License

This project is open source and available under the MIT License.

👨‍💻 Author

Sivakanth

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

⭐ Show your support

Give a ⭐️ if this project helped you!

📝 Notes

  • The app locks to portrait orientation for optimal user experience
  • BMI calculations follow standard WHO guidelines
  • Ads are displayed as banner ads at the bottom of the input screen

Made with ❤️ using Flutter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors