This example will cover all you need to know about flutter image upload to REST API. This complete example will cover single image upload with data, multiple images upload with data and, dynamic numbers of images upload with data. For this example i used Express-js-REST-API.
Used below plugings for this project
- get: ^4.3.8
- dio: ^4.0.0
- flutter_svg: ^0.22.0
- image_picker: ^0.8.3+3
To get a local copy up and running follow these simple example steps.
-
Clone the repo
git clone https://github.com/Sameera-Perera/Flutter-image-upload-complete-example.git
-
Install packages
flutter pub get
-
Run your API.(https://github.com/Sameera-Perera/Express-Js-REST-API-Image-Uploade-Complete-Example)
-
Change API base url
\lib\utilities\const.dart
const baseURL = 'http://192.168.1.4:3000/api';
Demo video flutter app - https://youtu.be/Zhd4uBEkXBk
Demo video REST API - https://youtu.be/t6hiHIqSnQg
Distributed under the MIT License. See LICENSE
for more information.
You Tube - @programming_night - Programming Night
Project Link: https://github.com/Sameera-Perera/Flutter-image-upload-complete-example