Let's create a new Flutter app. We will call it Movies:
- The first thing to do is to open the pubspec.yaml file and add a dependency to the HTTP library, which we'll use to make HTTP requests. Please check the latest available version at https://pub.dev/packages/http. Add the http library under the flutter dependency, as follows:
dependencies: flutter: sdk: flutter http: ^0.12.0+4
- Then, let's create a new file, called http_helper.dart, that we'll use to create the settings and methods that we'll use to connect to the web service. In the new file, let's import the HTTP library:
import 'package:http/http.dart' as http;
With the as http command, we are giving the library a ...