Simple API implementation made with Node.js and used in a Flutter application

Simple API implementation made with Node.js and used in a Flutter application

API-simples-e-flutter Simple API implementation made with Node.js and used in a Flutter application


Simple API implementation made with Node.js and used in a Flutter application.


This file shows how to install and configure the requirements, as well as what they are.


  • Open a terminal in the backend folder

  • Run this command to initialize:

 npm init -y
  • Now let's install some necessary packages:
 npm install express mongoose morgan cors faker
  • Mongodb:
 sudo service mongodb start
  • Let's start now:
 node src / index.js

alt text

You can start playing with the API now

Use http: // localhost: 4000 / api / users / create in the browser , 5 users will be created and with http: // localhost: 4000 / api / users you can see the users created. When looking at the terminal you will see the requests.

alt text

Flutter App

The backend is working so let's go to the App.

Create a Flutter project inside the repository folder.

 flutter create (name)
  • Open the project in VSCode

  • Delete the file from the test folder

  • Clean the main.dart file in the lib folder and put the repository's main.dart in place.

Go to pubspec.yaml and enter http: any in the same location as the image

alt text

Now on main.dart

 getUsers () async {
    http. Response response =  await http. get (
         '' ); // local server access 
    data = json. decode (response.body);
    setState (() {
      usersData = data [ 'users' ];

In place of the IP, we can use the emulator identifier or the network IP (in the case of a physical device or Flutter Web), which must change in the code depending on the case.

The network IP can be obtained with


After that, just apply the command to the terminal (it may take a while)

 Flutter run -d (namename)


alt text


The code was written thanks to the youtuber FaztCode tutorial.

Video link that explains the code in more detail

Download Details:

Author: josepedroso

Source Code:

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).