Flutter | Troubleshooting

Migration Dart Plugins

import 'package:flutter/services.dart';
client =createHttpClient();



import 'package:http/http.dart' as http;
client = new http.Client();





Your app is not using AndroidX

GoTo Flutter_Project -> android -> gradle.properties file. Open the gradle.properties file in any Text editor.

Add below lines in this file and Save the file.


Open your Flutter Project Root directory in Command Prompt or Terminal and execute

flutter clean

Flutter | Getting started

Create your first App

Copied from here and here

Step 1: Create the starter Flutter app

$ flutter create startup_namer
$ cd startup_namer
$ flutter devices
$ flutter run


Installation of Flutter

Instructions on https://flutter.io/get-started/install/

Installation of Dart SDK

Details are here

$ brew tap dart-lang/dart
$ brew install dart --devel

Run a flutter Application

$ flutter devices
$ flutter run [--verbose]
$ flutter emulators
5 available emulators:

Nexus_5X_API_28_x86      • Nexus 5X      • Google • Nexus 5X API 28 x86
Pixel_3_API_28           • pixel_3       • Google • Pixel 3 API 28
Pixel_XL_API_28          • pixel_xl      • Google • Pixel XL API 28
apple_ios_simulator      • iOS Simulator • Apple

To run an emulator, run 'flutter emulators --launch <emulator id>'.
To create a new emulator, run 'flutter emulators --create [--name xyz]'.
$ flutter emulators --launch apple_ios_simulator