Article directory
1. Download Flutter SDK
Open the official websitehttps://flutter.io/setup-windows/DownloadFlutter sdk
and unzip it to a directory
2. Install the Flutter plug-in in Android studio
Android studio
Flutter
Install plug-in in and check again and the effect will be displayed as shown in the figure: plug-in. Just agree to it. Restart When plug-in, you will automatically be prompted to download theFile - Settins - Plugins -
, and install Flutter - install
in , find Flutter
Dart
as
The red mark in the picture meansDart
The plug-in installation is complete
ConfigurationFlutter
and Dart
Path
Open settings in Android Studio
Languages
& Frameworks
can see two more options: Flutter
and Dart
, follow Just configure your own Flutter
and Dart
paths as shown below:
3. Create a Flutter small project
Provide simplified code:
import 'package:flutter/material.dart';
void main() {
return runApp(const Root());
}
class Root extends StatelessWidget {
const Root({
Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "daylight",
home: Scaffold(
appBar: AppBar(title: const Text("daylight")),
body: const Center(
child: Text("hello world"),
),
),
);
}
}
The effect of running the program is as shown below: