{"id":19303062,"url":"https://github.com/asc-lab/personal-insurance-flutter-poc","last_synced_at":"2025-04-22T11:31:59.008Z","repository":{"id":113372376,"uuid":"227062969","full_name":"asc-lab/personal-insurance-flutter-poc","owner":"asc-lab","description":"Flutter project example covering concerns commonly encountered in business apps.","archived":false,"fork":false,"pushed_at":"2020-03-10T19:18:21.000Z","size":776,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T22:46:52.755Z","etag":null,"topics":["dart","flutter","flutter-app","insurance","mobile-app","mockoon"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asc-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-12-10T08:09:28.000Z","updated_at":"2023-10-04T04:37:18.000Z","dependencies_parsed_at":"2023-06-15T11:30:26.130Z","dependency_job_id":null,"html_url":"https://github.com/asc-lab/personal-insurance-flutter-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-lab%2Fpersonal-insurance-flutter-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-lab%2Fpersonal-insurance-flutter-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-lab%2Fpersonal-insurance-flutter-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-lab%2Fpersonal-insurance-flutter-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asc-lab","download_url":"https://codeload.github.com/asc-lab/personal-insurance-flutter-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232152,"owners_count":21396581,"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","flutter","flutter-app","insurance","mobile-app","mockoon"],"created_at":"2024-11-09T23:24:54.067Z","updated_at":"2025-04-22T11:31:58.952Z","avatar_url":"https://github.com/asc-lab.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter PoC: Personal Insurance\n\nA Flutter project example covering concerns commonly encountered in business apps.\n\n\u003cbr\u003e\n\n\u003ctable\u003e\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"images/sim1.png\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"images/sim2.png\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"images/sim3.png\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\u003c/table\u003e\n\n## Blog Post\n\nhttps://altkomsoftware.pl/blog/flutter-dart-quickly-build-mobile-app-without-losing-much-hair/\n\n# Dependency\n\nThe application attempts to access a running Mockoon Mock API at startup. If the local server is not running, application will simply fail with a blank screen. \n\n- Mockoon\n  - https://mockoon.com/\n  - https://github.com/mockoon/mockoon\n    - e.g. MacOS Install: `brew cask install mockoon`\n\n\n\u003ctable\u003e\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"images/mockoon.png\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\u003c/table\u003e\n\n\u003cbr\u003e\n\n# Running\n\n- Ensure Mockoon Environment is configured with `mockoon_environment` - (import JSON into Mockoon). \n- Ensure Mockoon is running locally\n- Ensure API routes are accessible on `0.0.0.0` i.e. `localhost`, `127.0.0.1`\n  - e.g. http://localhost:3000/personalInsuranceFlutter/getDicts\n- Ensure the `apiURL` static field in `lib/services/Helper` class is correctly set\n  - Localhost setting for `apiURL` for The Android and iOS will differ, see below.\n  - The helper will auto-adapt the `apiURL` based on `Platform`.  \n\n\u003cbr\u003e\n\nIf the local server is not running, application will show an error on startup.\n\n\u003ctable\u003e\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"images/error_ios.png\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"images/error_droid.png\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\u003c/table\u003e\n\n\u003cbr\u003e\n\n## Android\n\n- `apiURL = \"http://10.0.2.2:3000/personalInsuranceFlutter/\";`\n- Ensure the emulator can access `localhost` via `10.0.2.2` in Dart code.   \n\n\u003cbr\u003e\n\n## iOS\n\n- `apiURL = \"http://localhost:3000/personalInsuranceFlutter/\";`\n\nThe iOS Simulator uses the host machine network so you should be able to just use `localhost` or your machines IP address, whichever IP your web service is listening on.\n\nMore info on https://stackoverflow.com/questions/6077888/how-do-i-access-the-host-machine-itself-from-the-iphone-simulator\n\nYou will need to add the following to the project's `Info.plist`.\n\n```\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n        \u003ctrue/\u003e\n\u003c/dict\u003e  \n```\n\nOtherwise this error is going to happen.\n\n```\nCannot start load of Task \u003cxx-xx\u003e.\u003cx\u003e since it does not conform to ATS policy.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc-lab%2Fpersonal-insurance-flutter-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasc-lab%2Fpersonal-insurance-flutter-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc-lab%2Fpersonal-insurance-flutter-poc/lists"}