Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 4.64 KB

README.md

File metadata and controls

59 lines (42 loc) · 4.64 KB

Flutter

Frame 71

Welcome to the UniSchedule Flutter repository! This repository contains the implementation of the UniSchedule application in Dart using the Flutter framework. UniSchedule is a comprehensive scheduling app designed to streamline the organization of academic and personal schedules for students at Universidad de los Andes.

Architecture Overview

The UniSchedule app follows a layered architecture pattern to ensure a clean separation of concerns and promote modularity, scalability, and maintainability. The architecture consists of the following layers:

  • Presentation Layer: Responsible for rendering the user interface and handling user interactions. This layer contains UI components such as widgets, screens, and layouts, organized within the presentation directory.

  • Application Layer: Acts as an intermediary between the presentation layer and the domain layer. It orchestrates business logic and application workflows, coordinating the flow of data and operations. Providers for state management are defined in the providers directory, facilitating data sharing and management across the application.

  • Domain Layer: Represents the core business logic and domain-specific entities, rules, and operations. Models representing various data entities and business rules are defined in the models directory.

  • Infrastructure Layer: Provides access to external resources and services such as databases, APIs, and device features. Repository classes abstract data access and manipulation operations, encapsulating interactions with external data sources. These repositories are defined in the repositories directory.

Directory Structure

The lib directory of this repository is organized into several subdirectories, each serving a specific purpose:

  • constants/: Contains constant values used throughout the application.
    • colors/: Defines color constants used for theming and styling.
    • http/: Contains constants related to HTTP requests and responses.
    • strings/: Defines string constants used for routing, assets, storage and text display.
    • styles/: Contains sizes, padding, font, and other styling constants.
    • themes/: Contains theme constants used for styling the application.
    • types/: Defines type constants used for data validation and conversion.
  • models/: Defines Dart classes representing data models used within the application.
  • providers/: Contains files defining providers for state management using the Riverpod package.
  • repositories/: Includes classes responsible for abstracting data access and manipulation operations.
  • routes/: Defines the routing configuration of the application for navigation between different screens.
  • services/: Contains utility classes or service classes responsible for performing specific tasks or providing functionalities used across multiple parts of the application.
    • local_authentication/: Contains classes related to local authentication using biometrics or PIN.
    • local_storage/: Contains classes related to local storage and data persistence.
    • network/: Contains classes related to network requests and API communication.
    • notifications/: Contains classes related to notifications and reminders.
  • utils/: Contains utility functions and helper classes used throughout the application.
  • views/: Houses UI-related files, including widgets, screens, and components responsible for rendering the user interface.
  • widgets/: Contains reusable widgets that can be used across multiple screens or components.
  • main.dart: The entry point of the application, where the Flutter app is initialized and run.

Troubleshooting

To authenticate with Firebase, you need to execute the following commands:

  1. npm install -g firebase-tools
  2. firebase login
  3. dart pub global activate flutterfire_cli
  4. flutterfire configure

We use files auto-generated by @riverpod and @freezer annotations. To build these files, run dart run build_runner watch

If the dependency flutter_datetime_picker throws Error: 'DatePickerTheme' is imported from both ..., follow these steps:

  1. Go to the dependency's file that throws this error - in windows, a path similar to C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_datetime_picker-1.5.1\lib\flutter_datetime_picker.dart
  2. Replace import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart with import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart' as dpt
  3. Replace all references to DatePickerTheme in the file with dpt.DatePickerTheme with a code editor