/digifood

Primary LanguageDartMIT LicenseMIT

Digifood Flutter Frontend Application

Youtube Udemy Linkedin: HadiKachmar Facebook: HadiKachmar Discord GitHub followers

Overview

This project is a small Android Flutter app. It includes a list of categorized products with their names, prices, and descriptions. It also features a cart system where products can be added and removed, with a displayed total.

Features

  • Categorized product listing
  • Product details including name, price, and description
  • Cart system for managing selected products
  • Dynamic total calculation for items in the cart
  • Utilizes a remote API source for product and category data

Installation

  1. Clone the repository: ```bash git clone https://github.com/hadikachmar3/digifood ```

  2. Navigate to the project directory: ```bash cd digifood ```

  3. Install the dependencies: ```bash flutter pub get ```

  4. Run the application on your device or emulator: ```bash flutter run ```

  5. To install the app on an Android device, use the provided APKs suitable for the device's architecture:

  • APK/app-arm64-v8a-release.apk for 64-bit ARM devices.
  • APK/app-armeabi-v7a-release.apk for 32-bit ARM devices.

Project Structure

  • lib/constants/: Constants used across the application.
  • lib/controller/: Business logic and controllers.
  • lib/models/: Data models for the application entities.
  • lib/screens/: Screen widgets for various views.
  • lib/services/: Services for API network communication.
  • lib/state/: State management providers and notifiers.
  • lib/utils/: Utility functions and helpers.
  • lib/widgets/: Custom reusable widgets.

Project Structure

State Management

This project uses flutter_riverpod for state management, allowing for a clean separation of app state from the UI and business logic.

API and Network Services

The ApiService class in lib/services/ handles all HTTP requests, including fetching products and categories from a remote API. It uses the http package for network communication and has error handling for different HTTP statuses and network errors.

Testing

To run the tests, use the following command: ```bash flutter test ```

Documentation

Code is well-documented with comments explaining the purpose and usage of classes, methods, and blocks of logic where necessary.

Additional Notes

  • The app has been tested and runs on Android version 6 and above.
  • Extra care has been taken to ensure performance optimization with the best practices in coding and state management.
  • APKs for both arm64-v8a and armeabi-v7a Android architectures are available in the APK folder for easy installation on different types of devices.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.