Get a title from user input.

Display the response on screen.

1. Add the http package

To install the http package, add it to the dependencies section
of the pubspec.yaml file. You can find the latest version of the
http package on pub.dev.

dependencies

http

<latest_version>

Import the http package.

If you develop for android, 
add the following permission inside the manifest tag
in the AndroidManifest.xml file located at android/app/src/main.

<uses-permission

android:name=

"android.permission.INTERNET"

/>

2. Sending data to server

This recipe covers how to create an Album
by sending an album title to the
JSONPlaceholder using the
http.post() method.