This project provides the base structure for the IKHLAS mobile developer assessment. It's a Flutter application skeleton for displaying prayer times. Candidates are expected to implement the core functionality to meet the requirements.
Implement a Flutter application that meets these requirements:
-
Display prayer times for today and tomorrow:
- When the app launches, it should immediately show prayer times for the current date (today)
- If tomorrow's prayer times are available locally, they should also be shown
- If tomorrow's prayer times are not available locally, fetch in the background without showing a loading indicator
-
Local data persistence:
- Prayer times should be saved locally once retrieved from the network
- If prayer times exist locally for the current date, the app should use that data
-
Network requests:
- If local data isn't available, fetch prayer times from the API
- Show a loading indicator when fetching data only if no prayer times are available to display
This base project provides the skeleton structure that you should build upon:
- models/ - Contains the
PrayerTimemodel class - cubit/ - Contains a skeleton for the
PrayerTimeCubitthat you need to implement - screens/ - Contains a basic UI structure that you need to complete
- services/ - Contains skeleton classes for API and storage services
- Fork this repository
- Run
flutter pub getto install dependencies - Implement the missing functionality marked with TODOs
- Test your implementation thoroughly
- Submit your solution
The following components need to be implemented:
-
Services:
- Complete the
ApiServiceto fetch prayer times from an API - Implement the
StorageServiceto save and retrieve prayer times locally
- Complete the
-
State Management:
- Complete the
PrayerTimeCubitto manage the application state - Implement the logic to fetch data from the API or local storage based on requirements
- Complete the
-
UI:
- Complete the
HomeScreento display prayer times - Implement proper loading states and error handling
- Complete the
We suggest using our STG prayer times API. Keep every query parameters the same; only change start_date and end_date.
https://prayer-times-stg.ikhlas.workers.dev/?longitude=101.6964&latitude=2.9264&start_date=2025-04-17&end_date=2025-04-18&state=any
It responds with JSON containing administrative_division, localities and prayer_times.
Your solution will be evaluated based on:
- Correct implementation of the requirements
- Code quality and architecture
- Error handling
- UI/UX implementation
- Testing approach (if applicable)
Good luck!