Project

General

Profile

Actions

dev #944

open

Implementation : Routing/ Theme/ localization

Added by Ayat Rahman over 1 year ago. Updated over 1 year ago.

Status:
Complete
Priority:
High
Assignee:
Target version:
Start date:
11/10/2024
Due date:
11/11/2024 (about 17 months late)
% Done:

100%

Estimated time:
7:00 h
Spent time:

Description

Objective

Complete the setup of core features for the Compress PDF mobile app, including routing, localization, theme management, shared preferences integration, and SVG functionality.

Tasks Completed:

  1. Go Router Setup and BaseLayout Creation

    • Implemented Go Router for routing across different screens of the app.
    • Created a BaseLayout that includes a bottom navigation bar for the primary sections of the app (Home, Tools, Files, Settings).
    • Configured the navigation system to handle multiple screens and ensure smooth user transitions.
  2. Setup Localization and Created Dummy JSON Files for 10 Languages

    • Integrated Flutter Localization to support multiple languages.
    • Created dummy JSON files for the following languages: English, Spanish, French, German, Indonesian, Italian, Portuguese, Russian, Turkish, Vietnamese.
    • Configured localization delegates to handle language switching throughout the app.
  3. Setup Dark Mode, Light Mode, and System Default Option for Themes

    • Implemented theme management with light mode, dark mode, and system default options.
    • Integrated Shared Preferences to persist the selected theme and apply it throughout the app.
  4. Defined Repetitive Colors in colors.dart File

    • Centralized all color definitions in a colors.dart file to ensure consistency and ease of maintenance.
    • Defined key colors for both light and dark modes (e.g., primary, background, text).
  5. Connected constants.dart with Localization JSON Data

    • Linked constants.dart file with localization data to ensure that all text and button labels are dynamically updated based on the current language.
    • Provided proper fallback mechanisms in case of missing translations.
  6. Persisted Localization and Theme Mode in Shared Preferences

    • Stored both language preferences and theme mode in SharedPreferences to ensure settings are preserved across app restarts.
  7. Installed Riverpod

    • Installed Riverpod for state management to handle app states like theme and language selections.
    • Set up Riverpod providers to manage and update app settings in a clean and scalable manner.
  8. Implemented Theme Responsive SVG Functionalities

    • Enabled dynamic color changes for SVG icons based on the selected theme (light/dark mode).
    • Created a responsive SVG widget that adjusts its color and appearance according to the theme and user preferences.

Outcome:

The core features for the Compress PDF mobile app are now implemented, including routing, localization, theme management, and SVG functionality. The app is fully responsive to language and theme changes, with persistent user preferences stored in SharedPreferences. Ready to begin further feature development and testing.


This issue tracks the successful setup of essential features for the Compress PDF app. Let me know if you'd like to modify anything!

Actions

Also available in: Atom PDF