Welcome to the Finance Digest App! This README provides an overview of the application, including implemented screens, improvements that can be added, and instructions for running the app and tests.
finance_digest/
├── lib/
│ ├── components/ # Reusable UI components
│ ├── constants/ # Application-wide constants (e.g., colors, fonts)
│ ├── features/ # Feature modules (e.g., signup, dashboard)
│ │ ├── signup/ # Signup feature containing UI and logic
│ │ ├── home/ # Home feature containing dashboard and other main screens
│ ├── services/ # Services such as authentication and notifications
│ ├── utils/ # Utility functions and helpers
├── test/ # Unit and widget tests
├── pubspec.yaml # Project dependencies
- Splash Screen: Displays an introductory splash screen with the app logo to give users a first impression and to perform background tasks.
- Legal Name Entry: Prompts the user to enter their first and last names for account creation.
- Notifications Permission: Asks the user for permission to send notifications, helping them stay updated.
- Dashboard: Shows personalized news items to the user, including their name in the greeting.
- Dashboard Error Handling: Handles errors by displaying a message when there is an issue loading the news.
- Unit Testing: Added two unit test cases to auth service .
- Skeleton Loading: Add skeleton loaders during data fetching to improve user experience.
- Input Validation: Add stricter validation for the user name fields, such as character limits and disallowing special characters.
- Retry Mechanism: Provide retry buttons for users when errors occur, especially when there are issues with network requests.
- Pull to Refresh: Add a pull-to-refresh mechanism for the dashboard news list.
- Offline Data Persistence: Cache news items locally to provide users with an offline experience.
- Unit and Integration Testing: Add more thorough tests to ensure stability, particularly around onboarding flow and error handling.
- Java SDK: Minimum version required is JDK 17. Make sure that JAVA_HOME is correctly set.
- Flutter: Make sure you have Flutter SDK installed.
-
Flutter Run: To run the application, use the following command:
flutter run --dart-define=API_KEY=ADD_YOUR_API_KEY_HERE
This command includes the required API key for accessing the news API.
-
Run Tests: To run the test suite, use the following command:
flutter test
This runs the unit and widget tests to verify the behavior of the app.
-
Generate Mock Files: If you are using
mockito
for unit testing, generate the mock files by running:dart run build_runner build
This command generates the mock classes for your tests.
Unit tests are written to verify different parts of the application. For example:
- Testing navigation logic based on whether the user has signed up.
- Testing user data persistence in
SharedPreferences
.
Run the unit tests using:
flutter test
Make sure that your Java SDK version is 17 or above, and set the JAVA_HOME
environment variable accordingly. This is crucial for Android builds.
- Always ensure the
API_KEY
is correctly set when running the app using the--dart-define
flag. - If issues occur while running the app or tests, verify that dependencies are correctly installed, and the SDK versions are compatible.
We are continuously working to improve the app and welcome contributions or feedback to enhance the onboarding experience and app performance.
This project is licensed under the MIT License.
For any questions or suggestions, please feel free to open an issue or contact the maintainers of this repository.