{"id":289,"date":"2025-07-24T11:24:18","date_gmt":"2025-07-24T11:24:18","guid":{"rendered":"https:\/\/documentation.iqonic.design\/prokit-flutter\/?p=289"},"modified":"2025-07-24T11:30:00","modified_gmt":"2025-07-24T11:30:00","slug":"app-structure","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/prokit-flutter\/app-structure\/","title":{"rendered":"App Structure"},"content":{"rendered":"<div class=\"nolwrap\">\n<p>\ud83d\udd52\u00a0<strong>Estimated Reading:<\/strong>\u00a01 minute<br>\ud83d\udcc2\u00a0<strong>Location:<\/strong>\u00a0File Structure \u2192 App Structure<\/p>\n\n\n\n<p id=\"block-88291e9d-e043-4c61-b217-ad23ef93cbf5\">\u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\ufe0f\u20e3 App Structure<\/h2>\n\n\n\n<p>This section explains the folder structure of the&nbsp;<strong>KiviCare Flutter App<\/strong>, which is organized to make the development process modular, maintainable, and scalable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcc2&nbsp;<strong>Folder-wise Overview<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Folder \/ File<\/strong><\/th><th><strong>Purpose \/ Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>\ud83d\udcc2&nbsp;<strong>Components\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;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.<br>\ud83d\udd39<strong>Purpose:<\/strong>&nbsp;Promotes&nbsp;<strong>modular code<\/strong>&nbsp;and&nbsp;<strong>reusability<\/strong>.<br>\ud83d\udd38&nbsp;<strong>Example:<\/strong>&nbsp;<code>CustomButton<\/code>,&nbsp;<code>UserCard<\/code>,&nbsp;<code>AppointmentTile<\/code><\/td><\/tr><tr><td><code>\ud83c\udf10&nbsp;<strong>Locale\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This directory holds the JSON file for multi-language support. It facilitates easy translation and localization of the application.<br>\ud83d\udd39<strong>Purpose:<\/strong>&nbsp;Helps in&nbsp;<strong>localizing<\/strong>&nbsp;the application to different languages.<br>\ud83d\udd38&nbsp;<strong>Example:<\/strong>&nbsp;<code>en.json<\/code>,&nbsp;<code>ar.json<\/code>,&nbsp;<code>de.json<\/code><\/td><\/tr><tr><td><code>\ud83e\uddfe&nbsp;<strong>Models\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;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.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Structures and stores data for use across different screens.<strong><br>\ud83d\udd38&nbsp;Example:&nbsp;<\/strong><code>UserModel<\/code>,&nbsp;<code>AppointmentModel<\/code><\/td><\/tr><tr><td><code>\ud83c\udf10&nbsp;<strong>Network\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This directory encompasses all the API configurations for the application. It centralizes the settings and endpoints required for network communication.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Centralizes API URLs, headers, and request\/response handling.<strong><br>\ud83d\udd38&nbsp;Example:&nbsp;<\/strong><code>ApiService.dart<\/code>,&nbsp;<code>ApiConfig.dart<\/code><\/td><\/tr><tr><td><code>\ud83d\udcb3&nbsp;<strong>PaymentGateways\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This section is dedicated to handling payment gateway integrations. It provides a separate space to configure and manage various payment options within the application.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Keeps payment logic separate and manageable.<strong><br>\ud83d\udd38&nbsp;Example:&nbsp;<\/strong><code>RazorpayService.dart<\/code>,&nbsp;<code>StripeService.dart<\/code><\/td><\/tr><tr><td><code>\ud83d\udcf1&nbsp;<strong>Screens\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This directory contains all the individual screens of the application. Each screen represents a distinct user interface with specific functionality.<br>\ud83d\udd39<strong>Purpose:<\/strong>&nbsp;Each screen is a complete unit with its own UI, logic, and data.<br>\ud83d\udd38&nbsp;<strong>Example:<\/strong>&nbsp;<code>LoginScreen<\/code>,&nbsp;<code>ProfileScreen<\/code>,&nbsp;<code>DashboardScreen<\/code><\/td><\/tr><tr><td><code>\ud83e\uddf0&nbsp;<strong>Utils\/<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;The Utils directory holds the app\u2019s configuration files, including color schemes, constants, and commonly used functions. It promotes code reuse and encapsulates common functionalities.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Keeps shared logic and static values in one place.<strong><br>\ud83d\udd38&nbsp;Example:&nbsp;<\/strong><code>AppColors.dart<\/code>,&nbsp;<code>Constants.dart<\/code>,&nbsp;<code>CommonFunctions.dart<\/code><\/td><\/tr><tr><td><code>\ud83c\udfa8&nbsp;<strong>app_theme.dart<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This file allows customization of the application\u2019s theme, including colors, fonts, and styles. It provides a convenient way to define the visual appearance of the entire app.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Maintains a&nbsp;<strong>consistent look and feel<\/strong>&nbsp;across the entire app.<strong><br>\ud83d\udd38&nbsp;Example:&nbsp;<\/strong><code>LightThemeData()<\/code>,&nbsp;<code>DarkThemeData()<\/code><\/td><\/tr><tr><td><code>\u2699\ufe0f&nbsp;<strong>configs.dart<\/strong><\/code><\/td><td><strong>Description:<\/strong>&nbsp;This file enables configuration customization for the application, such as changing the app\u2019s name and other settings. It serves as a central hub for modifying various aspects of the application\u2019s behavior and appearance.<br><strong>\ud83d\udd39Purpose:&nbsp;<\/strong>Central place to manage key variables that control app behavior.<strong><br>\ud83d\udd38&nbsp;Example:<\/strong><br>const APP_NAME = \u2018KiviCare\u2019;<br>const DOMAIN_URL = \u201chttps:\/\/yourdomain.com\u201d;<br>const DEFAULT_LANGUAGE = \u201cen\u201d;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p id=\"block-88291e9d-e043-4c61-b217-ad23ef93cbf5\">\u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcd8&nbsp;<strong>INFO: Screens Directory Breakdown<\/strong><\/h2>\n\n\n\n<p>The&nbsp;<strong>screens\/<\/strong>&nbsp;folder is organized feature-wise. Each feature usually contains the following structure:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udcc1 Common Subdirectories inside a Screen:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>components\/<\/strong>: This directory contains all the reusable UI components used in the feature\u2019s screens.<\/li>\n\n\n\n<li><strong>models\/<\/strong>: This directory typically holds data models or classes used within the feature.<\/li>\n\n\n\n<li><strong>services\/<\/strong>: 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.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udcc4 Common Files inside a Screen:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>controller.dart<\/strong>: This file contains classes responsible for controlling the logic and state of the feature\u2019s screens.<\/li>\n\n\n\n<li><strong>screen.dart<\/strong>: This file is where the UI implementation for the feature resides.<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd52\u00a0Estimated Reading:\u00a01 minute\ud83d\udcc2\u00a0Location:\u00a0File Structure \u2192 App Structure \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 \u2013 [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"parent":286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-289","post","type-post","status-publish","format-standard","hentry","category-prokit-flutter"],"featured_image_src":null,"author_info":{"display_name":"flutteradminiq","author_link":"https:\/\/documentation.iqonic.design\/prokit-flutter\/author\/flutteradminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/posts\/289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/comments?post=289"}],"version-history":[{"count":3,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":293,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/posts\/289\/revisions\/293"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/posts\/286"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/media?parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/categories?post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/prokit-flutter\/wp-json\/wp\/v2\/tags?post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}