{"id":29562707,"url":"https://github.com/itsnayan/sample_project","last_synced_at":"2025-07-18T18:01:47.562Z","repository":{"id":303927677,"uuid":"1016720483","full_name":"ITSNAYAN/sample_project","owner":"ITSNAYAN","description":"Sample Project","archived":false,"fork":false,"pushed_at":"2025-07-10T06:38:50.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-10T15:10:59.437Z","etag":null,"topics":["dart","dartpackage","flutter","flutter-apps","http","provider"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ITSNAYAN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-09T12:28:47.000Z","updated_at":"2025-07-10T06:38:54.000Z","dependencies_parsed_at":"2025-07-10T15:22:57.124Z","dependency_job_id":null,"html_url":"https://github.com/ITSNAYAN/sample_project","commit_stats":null,"previous_names":["itsnayan/sample_project"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ITSNAYAN/sample_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSNAYAN%2Fsample_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSNAYAN%2Fsample_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSNAYAN%2Fsample_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSNAYAN%2Fsample_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITSNAYAN","download_url":"https://codeload.github.com/ITSNAYAN/sample_project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITSNAYAN%2Fsample_project/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265806322,"owners_count":23831286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dartpackage","flutter","flutter-apps","http","provider"],"created_at":"2025-07-18T18:01:12.744Z","updated_at":"2025-07-18T18:01:47.550Z","avatar_url":"https://github.com/ITSNAYAN.png","language":"C++","readme":"Objective:\nBuild a simple mobile app that shows a list of articles fetched from a dummy API, with a detail screen for each article.\n\nWhat I Have Implemented (As per the given requirements):\n\nList Screen:\nFetched data from: https://jsonplaceholder.typicode.com/posts\nDisplayed article titles in a scrollable ListView\nShowed a loading indicator while data is being fetched\nAdded pull-to-refresh using RefreshIndicator\nKept the loading screen visible as the API server can be slow\nDetail Screen:\nNavigated to a detail screen when a list item is tapped\nDisplayed the full article title and body\nCode Structure:\nUsed a proper folder structure:\nmodels/ for data models\nscreens/ for UI screens\ncontrollers/ for logic\n\nservices/ for API\ncomponents/ for reusable widgets\nUsed Provider for state management\nKept the code clean and readable\n\nBonus Features:\n\nAdded a favorite button to each list item and detail screen\n\nTracked favorite articles using a Map\u003cint, bool\u003e based on article ID\n\nCreated a separate Favorite screen to display liked articles only\n\nFavorites are stored in app state using Provider logic\n\nChallenges Faced:\n\nAPI Call Timing in initState:\nInitially used Provider.of(...).getAllApiData() in initState()\nFaced issue where the loading spinner kept showing and no data appeared\nRealized initState() runs before the widget tree builds completely, causing context issues\nTried WidgetsBinding.instance.addPostFrameCallback(), still inconsistent\nFinal solution was Future.delayed(Duration.zero) to ensure UI builds first, then API loads\n\nFavorite Icon Toggling All Items:\nInitially used a single boolean to manage favorite state\nTapping one favorite icon affected all items in the list\nSolved by using each article’s unique ID and storing favorite states in a Map\nNow each item toggles its favorite state independently and updates correctly\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsnayan%2Fsample_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsnayan%2Fsample_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsnayan%2Fsample_project/lists"}