note: Valid Credentials
username: emilys, password: emilyspass
Flutter mobile application that interacts with the DummyJSON API, implements authentication using JWT (JSON Web Token), stores access and refresh tokens in secure storage, and refreshes tokens automatically using Dio. The app also displays a list of to-dos, handling pagination and caching data locally with SQLite, it supports landscape mode, has logging mechanism.
- Authentication with JWT: The app authenticates users using JWT, storing both the access token and refresh token securely.
- Secure Storage: Access and refresh tokens are stored using
flutter_secure_storage
to ensure security. - Token Refresh: The application automatically refreshes the access token when it expires using Dio interceptors.
- To-do List: Displays a list of to-dos fetched from the DummyJSON API.
- Pagination: To-dos are loaded in pages with efficient scrolling using pagination.
- Caching with SQLite: Cached to-do data is stored locally using SQLite for offline access.
- Internet Connectivity Handling: The app handles internet connectivity changes and shows appropriate feedback to the user when the internet connection is lost or restored.
- Flutter: The UI framework used for building the app.
- Dio: For making HTTP requests, handling authentication, and refreshing tokens.
- flutter_secure_storage: To store access and refresh tokens securely on the device.
- SQLite: Used for caching and storing to-do data locally.
- BLoC (Business Logic Component): For state management.
- Connectivity Plus: To check for internet connectivity and handle offline scenarios.
This app uses the DummyJSON API for to-do data and authentication. You can refer to the DummyJSON API documentation for more information.
-
Clone the repository:
git clone https://github.com/Hayan47/Task-Manager
-
Navigate to the project directory:
cd Task-Manager
-
Install dependencies:
flutter pub get
-
Run the App
flutter run
- Upon launching the app for the first time, you will be prompted to log in using your credentials.
- The app will fetch an access token and a refresh token, which are stored securely using flutter_secure_storage.
- The access token is used to authenticate API requests, and it will automatically refresh when expired using the refresh token.
- After authentication, the app displays a list of to-dos fetched from the DummyJSON API.
- The app supports pagination, fetching additional tasks as you scroll.
- Caching: Data is cached locally using SQLite, allowing users to view previously fetched to-dos even without an internet connection.
- The app automatically detects when there is no internet connection and allows the user to browse cached data.
- When internet connectivity is restored, the app syncs with the API and fetches the latest data.
APK link: https://www.mediafire.com/file/c0qhokaauxmhm83/Task_Manager1.0.4.apk/file