A beautiful and modern BMI (Body Mass Index) calculator built with Flutter using BLoC/Cubit state management.
My first complete Flutter application developed during NTI (National Technology Institute) Flutter course
- β¨ Beautiful UI Design: Modern and clean interface with custom colors and SVG illustrations
- π Real-time BMI Calculation: Accurate BMI calculation using external API
- π₯ Gender Selection: Support for both male and female users with visual indicators
- π― Health Categories: Displays BMI categories (Underweight, Normal, Overweight, Obese)
- π‘ Health Advice: Provides personalized health recommendations based on BMI results
- ποΈ State Management: Built with BLoC/Cubit for efficient and scalable state management
- π± Responsive Design: Works perfectly on different screen sizes and orientations
- π Loading States: Smooth loading indicators and error handling
- π API Integration: Real-time data fetching from health API
- π¨ Custom Widgets: Reusable components for better code organization
- Framework: Flutter 3.0+
- Language: Dart
- State Management: BLoC/Cubit Pattern
- HTTP Client: Dio
- UI Components: Material Design 3
- Icons: SVG Assets
- Architecture: Clean Architecture principles
Before running this application, make sure you have:
- π± Flutter SDK (>=3.0.0)
- π― Dart SDK (>=2.17.0)
- π» Android Studio / VS Code
- π² Android/iOS device or emulator
-
Clone the repository
git clone https://github.com/Hedra-Nabil/nti__first_app.git
-
Navigate to the project directory
cd nti__first_app -
Get the dependencies
flutter pub get
-
Run the app
flutter run
For the best experience, ensure you have:
- Enabled developer options on your Android device
- Connected your device via USB or set up an emulator
- Stable internet connection for API calls
lib/
βββ BMI_APP/
βββ Core/
βββ features/
βββ data/
β βββ model/
β βββ bmi_data_model.dart
β βββ bmi_model.dart
βββ presentation/
βββ Ui_screen/
β βββ bmi_welcome_screen.dart
β βββ bmi_home_screen.dart
β βββ bmi_result.dart
βββ controllers/
β βββ git_bmi/
β βββ cubit/
β βββ bmi_result_cubit.dart
β βββ bmi_result_state.dart
βββ components/
βββ theme/
β βββ app_color.dart
βββ constants/
β βββ app_image.dart
βββ cutsom_text_field.dart
βββ iamge_container.dart
main.dart
| Directory | Description |
|---|---|
data/model/ |
Data models for API responses and app data structures |
presentation/Ui_screen/ |
All the app screens (Welcome, Home, Results) |
presentation/controllers/ |
BLoC/Cubit state management files |
presentation/components/ |
Reusable UI components and widgets |
components/theme/ |
App colors and theme configuration |
components/constants/ |
App constants like image paths |
This project helped me master:
- Scaffold structure and navigation
- Widget composition and lifecycle
- Material Design implementation
- Custom widget development
- BLoC/Cubit pattern implementation
- State handling (loading, success, error)
- Event-driven architecture
- Reactive programming concepts
- RESTful API consumption
- JSON parsing and data modeling
- Error handling and retry logic
- Asynchronous programming
- Responsive layout design
- Custom styling and theming
- User input validation
- Accessibility considerations
- Welcome Screen: Beautiful introduction with app branding
- Input Screen: User enters name, gender, height, and weight
- API Call: Real-time BMI calculation using external health API
- Results Screen: Displays BMI value, health category, and recommendations
This app uses external health API for accurate BMI calculations:
- Endpoint: BMI Calculator API
- Method: GET request with query parameters
- Response: JSON with BMI value, health category, and recommendations
- Error Handling: Comprehensive error states and user feedback
| Welcome Screen | Input Screen | Results Screen |
|---|---|---|
![]() |
![]() |
![]() |
| Welcoming users with beautiful design | Easy data input with validation | Comprehensive health insights |
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Hedra Nabil
- NTI (National Technology Institute) for the comprehensive Flutter course
- Flutter Community for amazing resources and documentation
- API Provider for reliable health calculation services
- Material Design for beautiful UI guidelines
β Star this repository if you found it helpful!
Made with β€οΈ and Flutter


