Skip to content

Adote um pet é um projeto colaborativo e open source da comunidade Flutterando

Notifications You must be signed in to change notification settings

tecrodrigocastro/adote-um-pet-app

Repository files navigation

ADOTE UM PET

Bringing Tails and Hearts Together

Built with the technologies:


🔗 Table of Contents

I. 📍 Overview II. 👾 Features III. 📁 Project Structure IV. 🚀 Getting Started V. 📌 Project Roadmap VI. 🔰 Contributing VII. 🎗 License VIII. 🙌 Acknowledgments


📍 Overview

The "adote-um-pet-app" is a Flutter-based mobile application designed to streamline the pet adoption process. It offers features like real-time pet listings, user-friendly search filters, and interactive adoption forms. Targeted at prospective pet owners and animal shelters, this app simplifies finding and adopting pets, enhancing the user experience and increasing adoption rates.


👾 Features

Feature Summary
⚙️ Architecture
  • Utilizes a multi-platform approach with dependencies on Dart, Swift, Kotlin, and C++.
  • Structured with support for both mobile (iOS, Android) and desktop (Windows, Linux) platforms.
  • Employs a modular approach with separate directories and configuration files for different platforms.
🔩 Code Quality
  • Includes multiple configuration files like analysis_options.yaml for Dart which suggests a focus on maintaining code quality.
  • Use of modern programming languages and tools indicates adherence to current software development practices.
  • Presence of multiple language files and platform-specific code suggests complexity that requires robust quality control.
📄 Documentation
  • Documentation is primarily in Dart, with extensive use of additional config files (yaml, plist, xcconfig) indicating detailed setup and configuration documentation.
  • Multiple package managers and container tools documented, showing a comprehensive setup guide.
  • Usage of badges and markdown in documentation for better readability and accessibility.
🔌 Integrations
  • Integrates with multiple build systems and package managers like Gradle, CMake, and Pub.
  • Supports containerization with Podman, indicating readiness for scalable deployments.
  • Platform-specific integrations with iOS and Android for mobile deployment and feature integration.
🧩 Modularity
  • Project structure suggests a high degree of modularity with separate build configurations and dependency management for different components.
  • Use of platform-specific files and directories supports independent module development and maintenance.
  • Codebase includes platform-specific plugins and extensions, enhancing modularity.
🧪 Testing
  • Lack of explicit mention of testing frameworks or test files in the provided details suggests potential area for improvement in testing practices.
  • Dependency on multiple programming environments implies a need for comprehensive multi-platform testing strategies.
  • Modular architecture could facilitate unit and integration testing of individual components.
⚡️ Performance
  • Use of compiled languages like Dart could enhance performance for compute-intensive operations.
  • Flutter's performance features for smooth UI at 120 FPS could be leveraged for responsive app interfaces.
  • Performance optimization may be necessary for cross-platform compatibility and efficiency.

📁 Project Structure

└── adote-um-pet-app/
    ├── README.md
    ├── analysis_options.yaml
    ├── android
    │   ├── .gitignore
    │   ├── app
    │   │   ├── build.gradle
    │   │   └── src
    │   │       ├── debug
    │   │       │   └── AndroidManifest.xml
    │   │       ├── main
    │   │       │   ├── AndroidManifest.xml
    │   │       │   ├── kotlin
    │   │       │   └── res
    │   │       └── profile
    │   │           └── AndroidManifest.xml
    │   ├── build.gradle
    │   ├── gradle
    │   │   └── wrapper
    │   │       └── gradle-wrapper.properties
    │   ├── gradle.properties
    │   └── settings.gradle
    ├── design_system
    │   ├── .gitignore
    │   ├── .metadata
    │   ├── CHANGELOG.md
    │   ├── LICENSE
    │   ├── README.md
    │   ├── analysis_options.yaml
    │   ├── assets
    │   │   ├── icons
    │   │   │   ├── adopt-drawer.png
    │   │   │   ├── donate-drawer.png
    │   │   │   ├── messages-drawer.png
    │   │   │   ├── my-account-drawer.png
    │   │   │   └── petinha-drawer.png
    │   │   └── images
    │   │       ├── bird-button.png
    │   │       ├── cat-button.png
    │   │       ├── cat-choose.png
    │   │       ├── coelho-button.png
    │   │       ├── dog-button.png
    │   │       ├── dog-choose.png
    │   │       └── logo.png
    │   ├── lib
    │   │   ├── design_system.dart
    │   │   └── src
    │   │       ├── buttons
    │   │       │   ├── buttons.dart
    │   │       │   ├── primary_button_ds.dart
    │   │       │   └── selectable_button.dart
    │   │       ├── drawer
    │   │       │   ├── drawer_ds.dart
    │   │       │   └── drawer_item.dart
    │   │       ├── icons
    │   │       │   ├── app_icons.dart
    │   │       │   └── icons.dart
    │   │       ├── image
    │   │       │   ├── app_image.dart
    │   │       │   └── image.dart
    │   │       ├── inputs
    │   │       │   ├── inputs.dart
    │   │       │   ├── text_input_ds.dart
    │   │       │   └── text_input_gray_ds.dart
    │   │       └── theme
    │   │           ├── app_colors.dart
    │   │           ├── app_theme.dart
    │   │           └── theme.dart
    │   └── pubspec.yaml
    ├── devtools_options.yaml
    ├── ios
    │   ├── .gitignore
    │   ├── Flutter
    │   │   ├── AppFrameworkInfo.plist
    │   │   ├── Debug.xcconfig
    │   │   └── Release.xcconfig
    │   ├── Podfile
    │   ├── Podfile.lock
    │   ├── Runner
    │   │   ├── AppDelegate.swift
    │   │   ├── Assets.xcassets
    │   │   │   ├── AppIcon.appiconset
    │   │   │   │   ├── Contents.json
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   ├── [email protected]
    │   │   │   │   └── [email protected]
    │   │   │   └── LaunchImage.imageset
    │   │   │       ├── Contents.json
    │   │   │       ├── LaunchImage.png
    │   │   │       ├── [email protected]
    │   │   │       ├── [email protected]
    │   │   │       └── README.md
    │   │   ├── Base.lproj
    │   │   │   ├── LaunchScreen.storyboard
    │   │   │   └── Main.storyboard
    │   │   ├── Info.plist
    │   │   └── Runner-Bridging-Header.h
    │   ├── Runner.xcodeproj
    │   │   ├── project.pbxproj
    │   │   ├── project.xcworkspace
    │   │   │   ├── contents.xcworkspacedata
    │   │   │   └── xcshareddata
    │   │   │       ├── IDEWorkspaceChecks.plist
    │   │   │       └── WorkspaceSettings.xcsettings
    │   │   └── xcshareddata
    │   │       └── xcschemes
    │   │           └── Runner.xcscheme
    │   ├── Runner.xcworkspace
    │   │   ├── contents.xcworkspacedata
    │   │   └── xcshareddata
    │   │       ├── IDEWorkspaceChecks.plist
    │   │       └── WorkspaceSettings.xcsettings
    │   └── RunnerTests
    │       └── RunnerTests.swift
    ├── lib
    │   ├── main.dart
    │   └── src
    │       ├── app
    │       │   └── features
    │       │       ├── auth
    │       │       ├── donate
    │       │       └── message
    │       ├── app_widget.dart
    │       ├── core
    │       │   ├── DI
    │       │   │   └── dependency_injector.dart
    │       │   ├── cache
    │       │   │   ├── cache.dart
    │       │   │   ├── cache_exception.dart
    │       │   │   ├── cache_interface.dart
    │       │   │   ├── cache_params.dart
    │       │   │   └── shared_preferences
    │       │   ├── client_http
    │       │   │   ├── app_response.dart
    │       │   │   ├── client_http.dart
    │       │   │   ├── client_interceptor_interface.dart
    │       │   │   ├── dio
    │       │   │   ├── rest_client_exception.dart
    │       │   │   ├── rest_client_http_message.dart
    │       │   │   ├── rest_client_interface.dart
    │       │   │   ├── rest_client_multipart.dart
    │       │   │   ├── rest_client_request.dart
    │       │   │   └── rest_client_response.dart
    │       │   ├── errors
    │       │   │   ├── base_exception.dart
    │       │   │   ├── default_exception.dart
    │       │   │   ├── errors.dart
    │       │   │   ├── not_found_exception.dart
    │       │   │   ├── server_exception.dart
    │       │   │   └── unauthorized_exception.dart
    │       │   ├── features
    │       │   │   ├── choose
    │       │   │   └── onboarding
    │       │   ├── logger
    │       │   │   ├── app_logger.dart
    │       │   │   └── logger_app_logger_impl.dart
    │       │   ├── typedefs
    │       │   │   └── types.dart
    │       │   ├── usecase
    │       │   │   └── usecase_interface.dart
    │       │   └── utils
    │       │       ├── end_points.dart
    │       │       ├── loading_start.dart
    │       │       └── show_snack_bar.dart
    │       └── routes.dart
    ├── linux
    │   ├── .gitignore
    │   ├── CMakeLists.txt
    │   ├── flutter
    │   │   ├── CMakeLists.txt
    │   │   ├── generated_plugin_registrant.cc
    │   │   ├── generated_plugin_registrant.h
    │   │   └── generated_plugins.cmake
    │   ├── main.cc
    │   ├── my_application.cc
    │   └── my_application.h
    ├── macos
    │   ├── .gitignore
    │   ├── Flutter
    │   │   ├── Flutter-Debug.xcconfig
    │   │   ├── Flutter-Release.xcconfig
    │   │   └── GeneratedPluginRegistrant.swift
    │   ├── Podfile
    │   ├── Runner
    │   │   ├── AppDelegate.swift
    │   │   ├── Assets.xcassets
    │   │   │   └── AppIcon.appiconset
    │   │   │       ├── Contents.json
    │   │   │       ├── app_icon_1024.png
    │   │   │       ├── app_icon_128.png
    │   │   │       ├── app_icon_16.png
    │   │   │       ├── app_icon_256.png
    │   │   │       ├── app_icon_32.png
    │   │   │       ├── app_icon_512.png
    │   │   │       └── app_icon_64.png
    │   │   ├── Base.lproj
    │   │   │   └── MainMenu.xib
    │   │   ├── Configs
    │   │   │   ├── AppInfo.xcconfig
    │   │   │   ├── Debug.xcconfig
    │   │   │   ├── Release.xcconfig
    │   │   │   └── Warnings.xcconfig
    │   │   ├── DebugProfile.entitlements
    │   │   ├── Info.plist
    │   │   ├── MainFlutterWindow.swift
    │   │   └── Release.entitlements
    │   ├── Runner.xcodeproj
    │   │   ├── project.pbxproj
    │   │   ├── project.xcworkspace
    │   │   │   └── xcshareddata
    │   │   │       └── IDEWorkspaceChecks.plist
    │   │   └── xcshareddata
    │   │       └── xcschemes
    │   │           └── Runner.xcscheme
    │   ├── Runner.xcworkspace
    │   │   ├── contents.xcworkspacedata
    │   │   └── xcshareddata
    │   │       └── IDEWorkspaceChecks.plist
    │   └── RunnerTests
    │       └── RunnerTests.swift
    ├── pubspec.lock
    ├── pubspec.yaml
    ├── web
    │   ├── favicon.png
    │   ├── icons
    │   │   ├── Icon-192.png
    │   │   ├── Icon-512.png
    │   │   ├── Icon-maskable-192.png
    │   │   └── Icon-maskable-512.png
    │   ├── index.html
    │   └── manifest.json
    └── windows
        ├── .gitignore
        ├── CMakeLists.txt
        ├── flutter
        │   ├── CMakeLists.txt
        │   ├── generated_plugin_registrant.cc
        │   ├── generated_plugin_registrant.h
        │   └── generated_plugins.cmake
        └── runner
            ├── CMakeLists.txt
            ├── Runner.rc
            ├── flutter_window.cpp
            ├── flutter_window.h
            ├── main.cpp
            ├── resource.h
            ├── resources
            │   └── app_icon.ico
            ├── runner.exe.manifest
            ├── utils.cpp
            ├── utils.h
            ├── win32_window.cpp
            └── win32_window.h

📂 Project Index

ADOTE-UM-PET-APP/
ios
Podfile - The ios/Podfile configures the iOS project dependencies for a Flutter application, ensuring the correct setup of CocoaPods for the iOS platform
- It disables analytics to improve build times, establishes project configurations, and integrates Flutter-specific settings to manage dependencies and build processes effectively.
Runner.xcworkspace
contents.xcworkspacedata - Manages the workspace configuration for an iOS application by referencing essential project components
- It integrates the main application project, Runner.xcodeproj, with its dependencies managed by CocoaPods, indicated by Pods.xcodeproj
- This setup facilitates the development and maintenance processes within the Xcode IDE, ensuring smooth project organization and build management.
xcshareddata
WorkspaceSettings.xcsettings - Disables the preview functionality within the iOS workspace settings of the project
- Located in the xcworkspace directory, it configures environmental settings specific to the iOS version of the application, ensuring that preview features are turned off to possibly streamline the build process or adhere to specific development protocols.
IDEWorkspaceChecks.plist - Manages Xcode workspace settings specific to 32-bit compatibility warnings
- Located within the iOS application's workspace directory, it ensures that developers are alerted about potential issues when running the app on older architectures, thereby maintaining compatibility and enhancing the development process within the broader project architecture.
Runner.xcodeproj
project.pbxproj - The file `ios/Runner.xcodeproj/project.pbxproj` serves as a crucial component within the iOS application module of the project
- It is essentially the project file for Xcode, defining the configuration and organization of all source files, frameworks, and resources required to build the iOS application
- This file includes references to various source files such as `GeneratedPluginRegistrant.m` and `AppDelegate.swift`, which are integral for registering plugins and initializing the application, respectively
- It also manages dependencies like the `Pods_Runner.framework`, which suggests the use of CocoaPods for managing external libraries.

Additionally, the file outlines the inclusion of test files such as RunnerTests.swift, indicating a setup for unit testing within the iOS project
- The presence of AppFrameworkInfo.plist in the resources section points to the configuration settings necessary for the application framework.

Overall, this file is pivotal for the iOS app's compilation and execution, orchestrating how components are compiled, linked, and bundled into the final application
- It is a key part of the project's structure, ensuring that all parts of the iOS application are correctly integrated and maintained throughout the development lifecycle.

xcshareddata
xcschemes
Runner.xcscheme - Defines the configuration for building, testing, launching, profiling, and archiving the iOS application named Runner within the Xcode project
- It specifies settings for parallel builds, debugging, and the use of environment arguments, ensuring streamlined development cycles and efficient handling of build actions across different configurations and modes.
project.xcworkspace
contents.xcworkspacedata - Manages the workspace configuration for the iOS application within the Xcode project
- It specifies the workspace settings and references the project itself, ensuring that the development environment is correctly set up for modifications and builds
- This setup is crucial for maintaining the structure and dependencies of the iOS application as part of the larger project architecture.
xcshareddata
WorkspaceSettings.xcsettings - Configures workspace settings within the iOS application's Xcode project, specifically disabling the previews feature
- Located in the project's Xcode workspace directory, it plays a crucial role in managing development environment preferences that align with the broader architectural setup and operational protocols of the application.
IDEWorkspaceChecks.plist - Manages Xcode workspace settings specific to the iOS application within the project, ensuring compatibility and suppressing certain warnings during the development process
- It plays a crucial role in maintaining the development environment's integrity and configuration, particularly concerning 32-bit architecture compatibility warnings.
Flutter
AppFrameworkInfo.plist - Defines essential configuration and metadata for the iOS application within the Flutter framework, including development region, executable name, bundle identifier, and version details
- It sets the minimum OS version requirement and specifies the application's bundle type as a framework, ensuring proper identification and functionality across iOS devices.
Debug.xcconfig - Integrates configuration settings for the iOS Flutter application's debug build, pulling in dependencies and environment-specific parameters from CocoaPods and generated sources
- This setup ensures that the debug version of the app aligns with the necessary configurations for successful compilation and runtime behavior, facilitating a streamlined development process within the iOS platform.
Release.xcconfig - Incorporates configuration settings from external sources to streamline the release build process for the iOS platform within the Flutter framework
- By referencing specific configurations from the Pods dependency management and generated settings, it ensures consistent environment setup and optimizes the build performance for production releases.
RunnerTests
RunnerTests.swift - RunnerTests.swift serves as a test suite for the iOS Runner application within the project
- It utilizes XCTest to potentially verify the functionality added to the Runner application, ensuring reliability and performance
- This setup encourages the development of robust, error-free software by facilitating regular and systematic testing.
Runner
Runner-Bridging-Header.h - Bridges native iOS code with Flutter plugins, enabling seamless integration and functionality enhancement in the iOS version of the application
- Located within the iOS-specific directory, it imports essential configurations from the GeneratedPluginRegistrant, ensuring all plugins are registered and available for use throughout the app's iOS environment.
AppDelegate.swift - AppDelegate.swift serves as the primary entry point for the iOS application within the Flutter project, initializing the Flutter engine and registering generated plugins
- It ensures that the application is ready to handle Flutter-specific functionalities upon launch, integrating seamlessly with the underlying iOS system
- This setup is crucial for the app's performance and compatibility with iOS devices.
Info.plist - Defines configuration settings for the iOS application "Adote Um Pet," including localization, display name, bundle identifiers, version details, and supported device orientations
- It also specifies launch and main storyboard files, enhancing the app's compatibility and user interface on various Apple devices.
Assets.xcassets
LaunchImage.imageset
Contents.json - Manages the configuration of launch images for the iOS application, specifying different resolutions to support various device displays
- It includes three versions of the launch image to ensure optimal appearance across all device types, enhancing the user experience during app startup
- The JSON structure facilitates easy updates and maintenance of these assets by developers.
AppIcon.appiconset
Contents.json - Manages the configuration and assignment of various app icons for different Apple devices, ensuring that the correct icon sizes and resolutions are used for iPhones and iPads
- It specifies icons for multiple contexts, including standard application use and marketing purposes, across different screen resolutions and device models.
Base.lproj
Main.storyboard - Defines the user interface layout for the iOS application within the project, specifically setting up a FlutterViewController as the initial view controller
- It configures the view's dimensions, autoresizing behavior, and background color, ensuring the interface is adaptable to various screen sizes and orientations.
LaunchScreen.storyboard - Defines the layout and visual elements of the iOS application's launch screen, utilizing an XML-based storyboard format
- It configures an image view centered within a white background, ensuring the app presents a branded appearance during startup, enhancing user experience from the initial interaction.
lib
main.dart - Initializes the Flutter application by setting up essential configurations and dependencies
- It ensures the Flutter environment is ready, loads environment variables, configures dependency injection, and launches the main application widget
- This setup is crucial for the app's overall functionality and integration of its components, facilitating a smooth user experience and system operations.
src
routes.dart - Defines the navigation structure for the application, setting up routes for user onboarding, authentication, and additional features like donation information
- It establishes an initial route for authentication and includes nested routes for login, registration, and welcome screens, alongside routes for choosing options and onboarding processes.
app_widget.dart - AppWidget serves as the foundational widget for the application, integrating the design system and routing configurations
- It initializes the authentication management using Bloc and sets up the MaterialApp with predefined themes and routes, ensuring a cohesive user interface and navigation structure across the app.
core
features
choose
presentation
choose_page.dart - ChoosePage serves as a user interface within the application, presenting two main options: adopting or donating
- It utilizes visual elements and interactive containers to guide users either to initiate an adoption process or to navigate to donation information, enhancing user engagement through a visually appealing and straightforward layout.
onboarding
presentation
pages
onboarding_page.dart - OnboardingPage serves as the introductory interface within the application, guiding new users through initial setup or features
- Positioned within the core features of the onboarding module, it leverages Flutter to create a stateful widget that dynamically presents the onboarding content, ensuring a smooth user transition into the app's environment.
typedefs
types.dart - Defines a custom type alias Output<T> within the core functionality of the codebase, utilizing the Either type from the fpdart package
- This type encapsulates the dual nature of handling operations that may either result in a value of type T or an error represented by BaseException, streamlining error handling across the application.
usecase
usecase_interface.dart - Defines an abstract interface UseCase within the core framework, specifying a contract for all use cases across the application
- It mandates a method that executes business logic operations asynchronously, taking specific parameters and returning a typed result
- This structure ensures consistency and scalability in handling various business rules and data manipulations throughout the codebase.
DI
dependency_injector.dart - Establishes the dependency injection framework for the application, configuring and managing dependencies for network clients, logging, authentication processes, and session management
- It utilizes the GetIt package to facilitate the creation and retrieval of instances, ensuring efficient resource handling and decoupling throughout the application's authentication feature.
logger
app_logger.dart - AppLogger, defined within the core logger module, serves as the backbone for logging across the application
- It standardizes logging practices by providing methods for different levels of log messages, such as debug, error, warning, info, and fatal
- This abstraction ensures consistent logging behavior and facilitates easier maintenance and scalability of the logging system.
logger_app_logger_impl.dart - LoggerAppLoggerImpl serves as the implementation of the AppLogger interface, providing detailed logging capabilities across various levels such as debug, error, info, warning, and fatal
- It aggregates messages for batch processing and utilizes the Logger package to handle output, enhancing the traceability and debugging process within the application's architecture.
cache
cache_interface.dart - Defines the interface for caching mechanisms within the application, specifying methods for setting, retrieving, removing, and cleaning data
- The ICache interface ensures that any caching implementation adheres to a consistent protocol, facilitating data management and scalability across the system's architecture.
cache_exception.dart - Defines a custom exception, CacheException, which extends from BaseException, specifically for handling errors related to caching operations within the application
- This exception enriches error handling by allowing more specific responses to cache-related issues, thereby improving the robustness and maintainability of the error management system.
cache.dart - Exports key components for caching functionality within the application, including exceptions specific to cache operations, a cache interface defining essential methods, and parameters that configure cache behavior
- These elements are crucial for implementing effective data storage and retrieval mechanisms across the software, enhancing performance and scalability.
cache_params.dart - Defines a class, CacheParams, crucial for managing caching mechanisms within the application
- It encapsulates parameters necessary for cache operations, specifically a key and a value
- This class is fundamental in enabling efficient data retrieval and storage, thereby optimizing performance and resource management across the software's architecture.
shared_preferences
shared_preferences_impl.dart - SharedPreferencesImpl serves as the concrete implementation of the ICache interface within the application's caching layer
- It manages data persistence using the SharedPreferences library, allowing storage, retrieval, modification, and deletion of user preferences and application data in a structured and type-safe manner.
errors
unauthorized_exception.dart - Defines a custom exception, UnauthorizedException, which extends from BaseException, specifically for handling authentication errors within the application
- It is structured to provide a clear and specific error message when a user or process fails to authenticate correctly, enhancing error management and debugging across the system.
base_exception.dart - Defines an abstract class BaseException that standardizes error handling across the application by encapsulating error messages, associated data, optional status codes, and stack traces
- This foundational component enhances the robustness and maintainability of error management within the system's architecture.
errors.dart - Centralizes the management of error handling by providing a collection of exception classes, including base, default, not found, and server exceptions
- These classes facilitate consistent error reporting and handling across the application, enhancing the robustness and maintainability of the system.
server_exception.dart - ServerException, defined within the core errors module, extends BaseException to handle server-related errors across the application
- It encapsulates error messages, specific error codes, and optional stack traces to aid in debugging and error reporting, enhancing the robustness and maintainability of error management within the system.
default_exception.dart - Defines a DefaultException class that extends BaseException, providing a structured way to handle generic errors throughout the application
- This class is essential for maintaining a consistent error handling strategy, allowing for clearer debugging and maintenance processes within the broader system architecture.
not_found_exception.dart - Defines a custom exception, NotFoundException, which extends from BaseException
- It is specifically used throughout the application to handle scenarios where a required resource or element is not found, enhancing error management by providing a clear and specific exception type for such cases.
utils
show_snack_bar.dart - ShowMessageSnackBar, located within the core utilities of the codebase, facilitates the display of customizable snack bars in the application
- It leverages the design system for consistent styling and supports dynamic iconography and color schemes, enhancing user feedback mechanisms across various parts of the application interface.
end_points.dart - EndPoints in lib/src/core/utils/end_points.dart defines crucial URL paths for network communication within the application
- It establishes a base URL and specific endpoints for user authentication processes like login and registration, leveraging environment variables for configuration
- This setup centralizes the management of API routes, enhancing maintainability and scalability of network operations.
loading_start.dart - LoadingStart serves as a utility widget within the Flutter application, designed to manage initialization and cleanup processes for its child widgets
- It supports delayed initialization, allowing developers to specify a waiting period before executing setup logic, and provides a mechanism for clean resource disposal when the widget is removed from the widget tree.
client_http
rest_client_interface.dart - Defines an abstract interface for HTTP client operations essential for network communication within the application
- It standardizes methods for HTTP requests such as POST, GET, PUT, DELETE, PATCH, and file uploads, alongside managing interceptors to modify requests and responses across the software's network layer.
rest_client_exception.dart - Defines a custom exception class, RestClientException, which extends the functionality of a base exception to handle errors specifically related to HTTP client operations
- It incorporates additional properties to capture error details and the associated HTTP response, enhancing error reporting and handling within the client-server communication framework of the application.
rest_client_http_message.dart - Defines an abstract class, RestClientHttpMessage, serving as a foundational component within the core client HTTP functionality of the architecture
- It standardizes the structure and behavior of HTTP messages across various parts of the system, ensuring consistent communication protocols and data handling practices throughout the application.
rest_client_response.dart - RestClientResponse, located within the core client HTTP framework, encapsulates the response from a network request
- It stores the response data, status code, and message, and retains a reference to the originating request
- This class is crucial for handling and processing server responses throughout the application, facilitating error handling and data management in client-server interactions.
client_http.dart - Centralizes the foundational components for HTTP client operations within the codebase, facilitating the management of HTTP requests and responses
- It defines interfaces for client interceptors, handles exceptions, and structures HTTP messages, thereby standardizing communication protocols and error handling across different parts of the application.
rest_client_request.dart - RestClientRequest serves as a foundational component in the codebase, facilitating the creation and configuration of HTTP requests
- It supports setting paths, data payloads, HTTP methods, query parameters, and headers, essential for interacting with RESTful APIs
- The class also includes a method for cloning request configurations with modifications.
client_interceptor_interface.dart - Defines an interface for intercepting HTTP client requests, responses, and errors within the application's core networking layer
- IClientInterceptor allows for the modification and handling of HTTP messages and exceptions, facilitating customizable network operations and error management across the system.
rest_client_multipart.dart - RestClientMultipart facilitates the handling of multipart file uploads within the application's HTTP client architecture
- It encapsulates the necessary parameters for file uploads, including the file key, file name, file path, and optional file bytes, streamlining the process of sending files over network requests in a structured manner.
app_response.dart - Defines a generic AppResponse class to standardize the structure of HTTP responses across the application
- It encapsulates success status, messages, data content, and HTTP status codes, providing both constructors and methods for JSON serialization and deserialization to facilitate data handling in network operations.
dio
rest_client_dio_impl.dart - RestClientDioImpl serves as the implementation of the IRestClient interface using the Dio library, facilitating HTTP operations like GET, POST, PUT, DELETE, PATCH, and file uploads
- It integrates error handling, logging via AppLogger, and supports dynamic addition and removal of interceptors to customize request handling.
dio_adapter.dart - DioAdapter serves as a bridge in the codebase, facilitating the conversion between Dio library exceptions and the application's custom RestClient exceptions
- It ensures seamless integration of the Dio HTTP client with the application's core networking architecture, enabling robust error handling and request-response transformations.
client_interceptor_dio_impl.dart - ClientInterceptorDioImpl serves as a bridge within the codebase, translating between Dio-specific data structures and the application's custom HTTP client interfaces
- It handles HTTP request, response, and error interception, facilitating the modification and handling of these events through a unified interface, thereby enhancing error management and request customization.
app
features
auth
domain
entities
auth_entity.dart - AuthEntity serves as a core component in the authentication system, encapsulating user credentials and access tokens
- It integrates with the UserEntity to manage user-specific data, ensuring secure and efficient user authentication and authorization throughout the application
- This entity is pivotal for handling sessions and user identity verification processes.
user_entity.dart - Defines a UserEntity class central to the authentication feature, encapsulating user details such as ID, name, email, and contact information
- This entity serves as a foundational data structure across the application, facilitating user management processes and interactions within the broader system architecture focused on user authentication and profile handling.
usecases
sign_up_usecase.dart - SignUpUsecase, located within the authentication domain of the app's feature layer, orchestrates user registration by leveraging the AuthRepository interface
- It defines a method to execute the signup process using provided user details, encapsulated in SignUpParams, and returns a response wrapped in AppResponse indicating the outcome of the operation.
login_usecase.dart - LoginUsecase, located within the authentication domain of the app's architecture, orchestrates user login by leveraging the AuthRepository interface
- It processes login credentials through the LoginParams class and returns an authentication response encapsulated in AppResponse, facilitating user authentication management across the application.
repositories
auth_repository_interface.dart - Defines an interface for the authentication repository within the application's architecture, enabling the implementation of various authentication strategies such as Firebase and mock repositories
- It specifies methods for user login and signup processes, ensuring these functionalities are adaptable and interchangeable across different authentication systems.
presentation
pages
auth_base_page.dart - AuthBasePage serves as the initial interface for user authentication within the application, providing a user-friendly layout with options to log in or register
- It utilizes visual components from the design system, ensuring consistency across the app, and integrates navigation to further authentication processes, enhancing user flow and experience.
welcome_page.dart - WelcomePage serves as the introductory interface within the authentication feature of the application
- It presents a personalized greeting and a primary action button that navigates the user to the next step in the authentication process
- The design utilizes the project's design system for visual elements and responsiveness.
login_page.dart - LoginPage serves as the user interface for authentication within the application, facilitating user login through email and password verification
- It integrates with the AuthBloc for state management and SessionController for session handling, providing feedback via snack bars based on the authentication result.
register_page.dart - RegisterPage serves as the user interface for new user registration within the application's authentication feature
- It collects essential user information through various text inputs, including name, email, password, and contact details, and facilitates user registration by integrating navigation to welcome the user post-registration.
bloc
auth_event.dart - Defines the events that trigger authentication processes within the application, specifically focusing on user sign-up and login actions
- The SignUpAuthEvent handles new user registrations by encapsulating user data, while the LoginAuthEvent manages user logins through email and password verification, ensuring these components interact seamlessly with the broader authentication system.
auth_state.dart - Defines the state management for user authentication within the application, handling various states such as initial, loading, success, and failure for both sign-up and login processes
- Each state extends a base class ensuring consistency and reusability, crucial for maintaining clear state transitions and facilitating debugging and enhancements in the authentication feature.
auth_bloc.dart - AuthBloc orchestrates user authentication within the application, managing both sign-up and login processes
- It utilizes business logic from domain use cases to handle user events, transitioning between different states based on the success or failure of authentication actions, thereby updating the UI accordingly.
controller
session_controller.dart - SessionController, located within the authentication feature of the app, manages user session data by interfacing with shared preferences
- It facilitates the secure storage and retrieval of user tokens, essential for maintaining user sessions across the application
- This controller ensures that token management is centralized and consistent throughout the app's lifecycle.
message
presentation
bloc
message_state.dart - Defines the state management for messaging features within the application, utilizing the BLoC pattern
- It includes an abstract base class for message states and a concrete initial state class, ensuring that message-related UI components react appropriately to state changes, thereby facilitating a responsive and interactive user experience in the messaging module.
message_event.dart - Defines an abstract base class for events in the message feature's business logic component (BLoC), ensuring all message events maintain a consistent structure for state management
- It leverages the Equatable package for simplified value comparison, crucial for optimizing state transitions within the app's reactive data flow architecture.
message_bloc.dart - MessageBloc, located within the message feature of the app's presentation layer, orchestrates the handling of message-related events and states using the BLoC (Business Logic Component) pattern
- It initializes with a default state and is designed to respond dynamically to incoming message events, updating the UI state accordingly within the broader application architecture.
donate
presentation
pages
donate_info_page.dart - DonateInfoPage serves as a user interface within the donation feature, enabling users to provide details about their pets for adoption
- It includes text inputs for pet names and selection options for pet types, integrated within a structured layout that includes navigation and personalized user information, enhancing the user's interaction and experience within the app's donation process.
widgets
choose_pet_type_row.dart Manages the user interface for selecting a pet type in the donation feature of the app. The widget allows users to choose from different pet types (dogs, cats, birds, rabbits) for donation purposes, ensuring only one pet type is selected at a time through a visually appealing, horizontally scrollable row of selectable buttons.
bloc
donate_bloc.dart - DonateBloc, located within the donation feature's presentation layer, manages the state and events for user donations in the application
- It initializes with a default state and is designed to handle various donation-related events to update the UI accordingly, ensuring a responsive and interactive user experience in the donation process.
donate_event.dart - Defines the base class for events in the donation feature's business logic component (BLOC), ensuring all donation-related events maintain a consistent structure for state management
- It leverages the Equatable package for optimized value comparison, crucial for efficient state transitions within the app's reactive architecture.
donate_state.dart - Defines the state management for the donation feature within the application, utilizing the BLoC pattern
- It includes an abstract base class for donation states and a concrete initial state class, ensuring that donation-related UI components react appropriately to state changes, enhancing the app's responsiveness and user experience in the donation process.
android
build.gradle - Configures the build environment for all modules within the Android project by defining repository sources and setting directory paths for build outputs
- It ensures that all subprojects align with the root project's build directory structure and establishes dependencies on the main application module
- Additionally, it includes a task to clean up the build directories.
settings.gradle - Manages plugin configurations and repository settings for the Android module of the project, ensuring the correct loading of Flutter SDK paths and the inclusion of essential repositories like Google and Maven Central
- It also specifies versioning for key plugins such as Flutter and Kotlin, crucial for the project's build process.
app
build.gradle - Configures the Android build environment for a Flutter application within the project, specifying dependencies on Android and Kotlin plugins, and setting Java and Kotlin compilation options
- It defines the application's namespace, SDK versions, and build configurations, including a placeholder for a unique application ID and signing configurations for release builds.
src
main
kotlin
com
example
adote_um_pet
MainActivity.kt - MainActivity.kt serves as the entry point for the Android platform within the Adote Um Pet application, integrating the Flutter framework
- It extends FlutterActivity, facilitating the rendering of the Flutter UI as the primary interface for the app, ensuring a seamless user experience across Android devices
- This setup is crucial for maintaining consistent app behavior and interface on Android platforms.
design_system
analysis_options.yaml - Establishes coding standards and linting rules for the design system module within the broader project architecture
- By enforcing the use of relative imports, it enhances code maintainability and readability
- The configuration aligns with the Flutter community's best practices, ensuring consistency and quality in code development across the project.
pubspec.yaml - Defines the configuration for the "design_system" package within a Flutter project, specifying its basic metadata, version, and dependencies
- It sets up the Flutter SDK and google_fonts library for UI styling, and includes assets for images and icons
- Additionally, it configures development dependencies for testing and linting to ensure code quality.
.metadata - Maintains critical metadata for the Flutter project within the design_system directory, tracking properties essential for the Flutter tool's capability assessment and upgrade execution
- It records the project's Flutter version and channel, specifying the project type as a package, ensuring consistent tool behavior and compatibility across development environments.
lib
design_system.dart - Centralizes and exposes key user interface components of the design system, including buttons, icons, images, inputs, themes, and drawer elements
- By aggregating these resources, it simplifies access and integration into other parts of the application, ensuring consistency and reusability across the entire project architecture.
src
buttons
primary_button_ds.dart - PrimaryButtonDs defines a customizable button component within the design system library, tailored for the Flutter framework
- It facilitates the creation of buttons with configurable titles, actions, colors, and dimensions, adhering to the app's primary color scheme
- This component enhances UI consistency across the application by standardizing button design and functionality.
buttons.dart - Centralizes the management of button components within the design system by exporting primary and selectable button modules
- This setup facilitates modular development and ensures consistency across the user interface
- It serves as a foundational element in the architecture, allowing for streamlined updates and maintenance of button styles and behaviors across the application.
selectable_button.dart - SelectableButtonDs defines a customizable, state-aware button component within the design system library, enhancing the user interface by allowing visual differentiation based on selection state
- It supports dynamic sizing, optional imagery, and color adjustments, facilitating a cohesive and adaptable user experience across the application's various features and modules.
drawer
drawer_item.dart - DrawerItemDS defines a reusable widget for navigation drawers in the Flutter-based design system, encapsulating a list tile with optional leading icons
- It enhances user interface consistency by standardizing drawer items across the application, supporting both icon display and tap functionality to trigger navigation or actions.
drawer_ds.dart - CustomDrawerDS serves as a navigational component within the app's design system, providing a user interface for accessing different sections such as account settings, adoption options, donations, messaging, and logout functionalities
- It enhances user interaction by integrating personalized elements like user name, location, and image, alongside actionable items for a seamless app experience.
image
image.dart - Exports the app_image.dart module, centralizing image-related functionalities within the design system library
- Positioned within the broader architecture, it simplifies the integration and management of image assets across the application, ensuring consistency and reusability
- This setup enhances the modularity and maintainability of the codebase, particularly in the handling of visual elements.
app_image.dart - Centralizes and manages the asset references for images within the design system of the project, ensuring consistent access to visual resources like logos and buttons across the application
- It defines a structured approach to handle image assets, facilitating easier updates and maintenance by referencing them through a single source point in the codebase.
theme
app_colors.dart - AppColors in the design_system/lib/src/theme directory defines a centralized palette of colors used throughout the application
- It standardizes visual elements by providing consistent color values for primary, secondary, and utility colors, enhancing the UI's aesthetic coherence and maintainability
- This setup facilitates easy updates and ensures uniformity across different components and screens.
theme.dart - Centralizes and streamlines the management of visual aesthetics across the application by exporting theme-related functionalities
- Specifically, it facilitates the integration and consistent application of color schemes and overarching thematic elements defined in app_colors.dart and app_theme.dart, ensuring a cohesive user interface design throughout the project.
app_theme.dart - AppTheme in the design_system/lib/src/theme directory defines the visual style for the application, setting colors, typography, and layout properties using ThemeData
- It integrates Google Fonts for textual elements and ensures consistent theming across different UI components like app bars, drawers, and text elements.
inputs
inputs.dart - Exports components for text input handling within the design system, specifically standard and gray-styled text inputs
- Positioned in the inputs directory of the design system library, it facilitates modular integration and enhances UI consistency across the application by providing predefined text input styles that developers can readily utilize in various parts of the project.
text_input_gray_ds.dart - TextInputGrayDs is a reusable widget in the design system library, specifically tailored for creating text input fields with a gray background
- It incorporates customizable features such as label text, input validation, and adjustable height, ensuring a consistent and user-friendly interface across the Flutter application
- This component enhances the UI consistency by adhering to the defined design standards.
text_input_ds.dart - TextInputDs serves as a customizable text input widget within the design system, tailored for various user input scenarios
- It supports features like password visibility toggle, input validation, and adjustable dimensions, enhancing user interaction by adapting to different form factors and requirements in the application's UI design.
icons
icons.dart - Exports the app_icons.dart module, centralizing icon resources for the design system
- Positioned within the design_system/lib/src/icons directory, it simplifies access to app-specific icons across the entire application, enhancing consistency and maintainability
- This setup supports a modular architecture by allowing straightforward updates and integration of icon assets.
app_icons.dart - AppIcons in the design_system library centralizes the management of icon assets used throughout the application's user interface
- It defines a set of constants for drawer icons, including adopt, donate, messages, my account, and petinha, ensuring consistent and efficient access to these resources across the application
- This approach facilitates maintainability and scalability of the UI components.


🚀 Getting Started

☑️ Prerequisites

Before getting started with adote-um-pet-app, ensure your runtime environment meets the following requirements:

  • Programming Language: Dart

⚙️ Installation

Install adote-um-pet-app using one of the following methods:

Build from source:

  1. Clone the adote-um-pet-app repository:
❯ git clone https://github.com/tecrodrigocastro/adote-um-pet-app
  1. Navigate to the project directory:
cd adote-um-pet-app
  1. Install the project dependencies:

Using pub  

❯ flutter pub get

🤖 Usage

Run adote-um-pet-app using the following command: Using pub  

❯ flutter run android

🧪 Testing

Run the test suite using the following command: Using pub  

❯ flutter run test

🔰 Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/tecrodrigocastro/adote-um-pet-app
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


🎗 License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


🙌 Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

About

Adote um pet é um projeto colaborativo e open source da comunidade Flutterando

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published