https://github.com/asc-lab/personal-insurance-flutter-poc
Flutter project example covering concerns commonly encountered in business apps.
https://github.com/asc-lab/personal-insurance-flutter-poc
dart flutter flutter-app insurance mobile-app mockoon
Last synced: 13 days ago
JSON representation
Flutter project example covering concerns commonly encountered in business apps.
- Host: GitHub
- URL: https://github.com/asc-lab/personal-insurance-flutter-poc
- Owner: asc-lab
- License: other
- Created: 2019-12-10T08:09:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T19:18:21.000Z (about 5 years ago)
- Last Synced: 2025-04-01T22:46:52.755Z (about 1 month ago)
- Topics: dart, flutter, flutter-app, insurance, mobile-app, mockoon
- Language: Dart
- Homepage:
- Size: 758 KB
- Stars: 16
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter PoC: Personal Insurance
A Flutter project example covering concerns commonly encountered in business apps.
![]()
![]()
## Blog Post
https://altkomsoftware.pl/blog/flutter-dart-quickly-build-mobile-app-without-losing-much-hair/
# Dependency
The 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.
- Mockoon
- https://mockoon.com/
- https://github.com/mockoon/mockoon
- e.g. MacOS Install: `brew cask install mockoon`
# Running
- Ensure Mockoon Environment is configured with `mockoon_environment` - (import JSON into Mockoon).
- Ensure Mockoon is running locally
- Ensure API routes are accessible on `0.0.0.0` i.e. `localhost`, `127.0.0.1`
- e.g. http://localhost:3000/personalInsuranceFlutter/getDicts
- Ensure the `apiURL` static field in `lib/services/Helper` class is correctly set
- Localhost setting for `apiURL` for The Android and iOS will differ, see below.
- The helper will auto-adapt the `apiURL` based on `Platform`.
If the local server is not running, application will show an error on startup.
![]()
## Android
- `apiURL = "http://10.0.2.2:3000/personalInsuranceFlutter/";`
- Ensure the emulator can access `localhost` via `10.0.2.2` in Dart code.
## iOS
- `apiURL = "http://localhost:3000/personalInsuranceFlutter/";`
The 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.
More info on https://stackoverflow.com/questions/6077888/how-do-i-access-the-host-machine-itself-from-the-iphone-simulator
You will need to add the following to the project's `Info.plist`.
```
NSAppTransportSecurityNSAllowsArbitraryLoads
```Otherwise this error is going to happen.
```
Cannot start load of Task . since it does not conform to ATS policy.
```