- Select File > New Flutter Project.
- Select Flutter application as the project type, and press Next.
- Make sure that the Flutter SDK Path text field specifies the location of the SDK. Install the SDK if you haven’t yet done so.
- Enter a project name (for example,
myapp
), and press Next. - Click Finish.
- Wait for Android Studio to install the SDK, and create the project.
In the project structure find lib folder and open main.dart file.
replace the below code in main.dart file
import 'package:flutter/material.dart'; void main(){ runApp( Center( child: Text( "Hello World", textDirection: TextDirection.ltr ), ) ); }
Run the app
- Locate the main Android Studio toolbar:
- In the target selector, select an Android device for running the app. If none are listed as available, select Tools> Android > AVD Manager and create one there. For details, see Managing AVDs.
- Click the run icon in the toolbar, or invoke the menu item Run > Run.
No comments:
Post a Comment