Follow this guide to fetch crimegen data from your Flutter app. The http library will be used to fetch the database data through its REST API.
First you need to connect your app to the crimegen database. It will authorize you to access this database API using your app keys. If your app doesn't have keys at Back4App yet, they will be generated during this process.
Now let's customize your query to fetch the data that you need!
Add the http package's latest version to the dependencies section of your pubspec.yaml file:
Install the package from the command line:
If you are building an Android app, make sure that it has internet access permission. Your app's AndroidManifest.xml file should have the following line right after the application section:
Add the following code to your Flutter app:
After running your app, you should see the following output: