The article directories

    • About importing existing Flutter projects into AndroidStudio
    • with TickerProviderStateMixin
    • Questions about HTTP packages

About importing existing Flutter projects into AndroidStudio

A flutter project cannot be opened by importing project. Use lie-open to select the folder where the project Gradle is located

with TickerProviderStateMixin

Do not omit with when formatting code, otherwise it will report the following type conversion exception

Error: The argument type '#lib1::LoginPageState' can't be assigned to the parameter type '#lib2::TickerProviderStateMixin
Copy the code

Questions about HTTP packages

Import ‘package: HTTP /http.dart’ as HTTP; If this is not found, check the pubspec.lock file for HTTP dependencies

**http:** dependency: "direct main" description: name: http url: "https://pub.flutter-io.cn" source: hosted version: "0.12.0 + 1"Copy the code

If not, manually add the dependency in pubspec.yaml. In some cases, the default lock package can be directly dependent, but yamL does not have it, it is not optimized, if not, remember to manually import

Dependencies: ** HTTP: ^0.12.0+1**Copy the code