skip to Main Content

I want to connect PostgreSQL to my flutter application as my database for it. Is shelf package relevant or should I make API for the same.
Please tell, I am finding solutions from many days but today I got to know about the shelf dart package. Is it enough?

2

Answers


  1. As far as I know, PostgreSQL DB already has a dependency in the Pub.dev, you can use it to access the database but of course, the database should be hosted in Cloud or Localhost for development then you can use it easily with this dependency, or if you’d like to create an API that’s totally acceptable.

    Login or Signup to reply.
  2. You can connect your Flutter application to an already set up and hosted PostgreSQL database, using the Postgres package.

    First of all, set up a PostgreSQL database, and host it either locally or over the cloud.

    In your Flutter project, add the Postgres package as a dependency in your.yaml file and also import it.

    Create an API by connecting using this package. You can use this API to query the database further.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search