shahanajparvin / todo_flutter_app_firebase

2 stars 1 forks source link

Flutter ToDo App

Overview

This Flutter-based ToDo app allows users to manage tasks both online and offline, with seamless synchronization to Firebase. It is designed using clean architecture and incorporates app flavors for different environments (e.g., development, staging, production). The project uses flutter_bloc for state management, supports localization in English and Arabic, and implements complex animations while optimizing performance.

App Screenshots

Screenshot 1 Screenshot 3 Screenshot 3

Screenshot 1 Screenshot 3 Screenshot 3

Screenshot 1 Screenshot 3 Screenshot 3

Screenshot 1 Screenshot 3 Screenshot 3

Screenshot 1 Screenshot 3 Screenshot 3

Screenshot 1 Screenshot 3 Screenshot 3

Project Architecture

The project follows the Clean Architecture pattern, ensuring separation of concerns and scalability. Flavors are integrated to handle environment-specific configurations.

The layers include:

Features

Core Features:

Flavors:

State Management

State management is handled using the flutter_bloc package, ensuring a clear separation between UI and business logic.

Key BLoC instances:

Database

The app ensures that the local and remote databases stay in sync using background syncing and reactive updates on network changes.

Offline Sync

The app uses the flutter_workmanager package to sync tasks with Firebase every 6 hours. If the network status changes from offline to online, tasks are immediately synchronized.

Sync Conditions:

Localization

The app supports both English and Arabic using the intl package. Language switching is dynamic, managed by LanguageBloc.

User Interface

The app’s UI focuses on delivering a smooth user experience with animations, while optimizing for memory efficiency.

Key UI elements:

App Flavors

Flavors are used to configure the app for different environments: development, staging, and production. This ensures environment-specific configurations such as Firebase connections, API endpoints, and other settings.

Flavor Configuration

Each flavor has its own Firebase configuration and environment settings:

Localization

The app supports both English and Arabic using the intl package. Language switching is dynamic, managed by LanguageBloc.

To Generate Translations

To generate translations for your app, run the following command:

flutter gen-l10n

Running the App

To Run Staging:

--flavor staging

To Run Live:

--flavor live

To Build Staging Apk:

flutter build apk --debug --target lib/main_staging.dart 

To Build Release Apk:

flutter build apk --release --target lib/main_live.dart

Screenshot 1 Screenshot 3

flutter pub run build_runner build