ProKit Flutter - Documentation
ProKit Flutter

App Structure

🕒 Estimated Reading: 1 minute
📂 Location: File Structure → App Structure

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

2️⃣ App Structure

This section explains the folder structure of the KiviCare Flutter App, which is organized to make the development process modular, maintainable, and scalable.

📂 Folder-wise Overview

Folder / FilePurpose / Description
📂 Components/Description: This directory contains all the reusable UI components used in the screens of the application. It allows for modular and organized development, where each screen can have multiple components.
🔹Purpose: Promotes modular code and reusability.
🔸 Example: CustomButtonUserCardAppointmentTile
🌐 Locale/Description: This directory holds the JSON file for multi-language support. It facilitates easy translation and localization of the application.
🔹Purpose: Helps in localizing the application to different languages.
🔸 Example: en.jsonar.jsonde.json
🧾 Models/Description: This directory includes a base class that serves as a data store and enables other classes to track changes to that data. It provides a structured approach to data management within the application.
🔹Purpose: Structures and stores data for use across different screens.
🔸 Example: 
UserModelAppointmentModel
🌐 Network/Description: This directory encompasses all the API configurations for the application. It centralizes the settings and endpoints required for network communication.
🔹Purpose: Centralizes API URLs, headers, and request/response handling.
🔸 Example: 
ApiService.dartApiConfig.dart
💳 PaymentGateways/Description: This section is dedicated to handling payment gateway integrations. It provides a separate space to configure and manage various payment options within the application.
🔹Purpose: Keeps payment logic separate and manageable.
🔸 Example: 
RazorpayService.dartStripeService.dart
📱 Screens/Description: This directory contains all the individual screens of the application. Each screen represents a distinct user interface with specific functionality.
🔹Purpose: Each screen is a complete unit with its own UI, logic, and data.
🔸 Example: LoginScreenProfileScreenDashboardScreen
🧰 Utils/Description: The Utils directory holds the app’s configuration files, including color schemes, constants, and commonly used functions. It promotes code reuse and encapsulates common functionalities.
🔹Purpose: Keeps shared logic and static values in one place.
🔸 Example: 
AppColors.dartConstants.dartCommonFunctions.dart
🎨 app_theme.dartDescription: This file allows customization of the application’s theme, including colors, fonts, and styles. It provides a convenient way to define the visual appearance of the entire app.
🔹Purpose: Maintains a consistent look and feel across the entire app.
🔸 Example: 
LightThemeData()DarkThemeData()
⚙️ configs.dartDescription: This file enables configuration customization for the application, such as changing the app’s name and other settings. It serves as a central hub for modifying various aspects of the application’s behavior and appearance.
🔹Purpose: Central place to manage key variables that control app behavior.
🔸 Example:

const APP_NAME = ‘KiviCare’;
const DOMAIN_URL = “https://yourdomain.com”;
const DEFAULT_LANGUAGE = “en”;

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

📘 INFO: Screens Directory Breakdown

The screens/ folder is organized feature-wise. Each feature usually contains the following structure:

📁 Common Subdirectories inside a Screen:

  • components/: This directory contains all the reusable UI components used in the feature’s screens.
  • models/: This directory typically holds data models or classes used within the feature.
  • services/: This directory is used for making API calls and often contains service classes responsible for fetching data from APIs, handling responses, and other related tasks.

📄 Common Files inside a Screen:

  • controller.dart: This file contains classes responsible for controlling the logic and state of the feature’s screens.
  • screen.dart: This file is where the UI implementation for the feature resides.