Connect the flutter with MySQL database with Nodejs API?

218 Views Asked by At

I am trying to make connection with flutter with MySQL, Nodejs API. and I did not any idea regarding that, and even there is no any video available on youtube for flutter database connectivity with mysql and node api.

I don't have any idea regarding connectivity with mysql with node, and even there is no any video available on youtube , so I want steps to connect flutter to database with mysql using nodejs.

1

There are 1 best solutions below

2
On

I did not know the exact structure of your app so just share my experience.

It seems that you are tyring to consume something (from a MySQL database) in your Flutter app.

I would do like below:

  1. Use PHP and related framework (say Lumen, Slim) to create the API backend and expose it via an URI like: https://api.mydomain.com.
  2. In your Flutter or any frontend, use language recommended way to consume the API (which normally returns JSON data) and populate your UI.

Hope that helps.