PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, May 19, 2022

[FIXED] How can I connect my Flutter app to local sql server database using API?

 May 19, 2022     android, flutter, restful-authentication, sql, web-services     No comments   

Issue

Am working on a flutter app that is required to do CRUD functions from sql server. I have researched and found that I can use REST API or webservice for the same. How can I implement this?


Solution

Step 1: choose a backend language/framework that will let you create a REST API. Laravel is one. If you want everything in Dart, Aqueduct I hear is a good choice.

EDIT/NOTE: Aqueduct sunset news here: https://stablekernel.com/article/announcing-the-sunsetting-of-aqueduct-our-open-source-server-side-framework-in-googles-dart/

Step 2: Make that backend do the things that need to be done with the database. Make sure you handle security/authentication. Test it with something like Postman. Manually be able to use it just like the app would use it, e.g., "making this request adds a post".

Step 3: Now develop a Flutter app that connects to this backend with a Dart package such as dio, http, etc. More info here: https://flutter.dev/docs/cookbook#networking



Answered By - Gazihan Alankus
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing