0

I am using aws-amplify and aws-datastore plugins in my Flutter ios app as the backend is AWS.

I would like to see the values of the Models in the local datastore. I don't want to query the datastore in code. I actually want to see the value in the DB engine.

Below is the browser implementation which I am trying to get at. enter image description here

When I do step debugging I can't the values from the DB engine which makes sense. Below is a screenshot. How does one see the local DB values in Flutter?

enter image description here

I also tried to get some inspiration from the Flutter docs on SQLlite but they have no information on DB management. Please share some insights on this.

Vishal Khialani
  • 2,557
  • 6
  • 38
  • 49

1 Answers1

0

You can use Flutter DevTools to inspect the local database involves a few steps. Here's a general outline of how you can do it:

  1. Start Flutter DevTools:

    • Open a terminal window.
    • Navigate to your Flutter app's directory.
    • Run the command: flutter pub global run devtools.
    • This will start the DevTools server.
  2. Connect DevTools to your App:

    • Open your Flutter app in a browser by visiting http://localhost:9100.
    • Make sure your app is running or paused at a breakpoint.
  3. Inspect the Local Database:

    • In the DevTools UI, go to the "Database" tab.
    • Select the SQLite database you want to inspect. You might need to find the exact location of your app's database file.
    • DevTools will display the tables and data within the database.
    • You can run SQL queries, view table data, and even modify data if necessary.