Install Android Studio (link provided). Open Android Studio, go to Configure, then AVD Manager. Create a new virtual device, select a device (e.g., Nexus 6), and choose a system image (e.g., Pie for stability). Name the device and set graphics to hardware for faster rendering. Finish the setup; installation may take a few minutes for the first time.
Go to Configure, then Plugins. In the Marketplace, search for 'Flutter' and install the plugin. This will also prompt you to install the Dart plugin, which is a dependency. Restart Android Studio after installation to activate the plugins. This adds an option to create a new Flutter project on the start screen.
Click 'Start a new Flutter project'. Choose 'Flutter Application' and click Next. Name the project (e.g., 'my_app'), select a project location, and provide a company domain (e.g., 'yourname.something.com'). Click Finish to create the project. The project will open with a sample Flutter application.
To customize Android Studio's appearance, go to File > Settings. Under 'Appearance & Behavior' > 'Appearance', select a theme (e.g., Darcula) and adjust the UI font size for better visibility. Under 'Editor' > 'Font', adjust the code font size for clarity during coding.
The project contains core folders: 'my_app' (source code), 'external libraries', 'Android' (platform-specific Android files), 'iOS' (platform-specific iOS files), and 'lib' (where 99% of coding takes place, including 'main.dart'). The 'test' folder is for testing files and can be deleted for beginner projects. Configuration files are also present.
The 'main.dart' file contains the code for the default sample app. It primarily involves building a widget tree. The video quickly reviews the structure, highlighting how widgets are nested. Don't worry about understanding everything at this stage, as it will be covered later.
Open the previously created virtual device by clicking 'No devices' at the top and selecting it. Click the play button to run the sample application on the emulator. The first run, especially the 'initializing Gradle' step, may take some time. The sample app displays a basic app bar, text, and a button that increments a counter.
The code starts with an import statement and a 'main' function that calls 'runApp'. 'runApp' takes a widget as an argument, which becomes the root widget (e.g., 'MyApp'). 'MyApp' extends 'StatelessWidget' and its 'build' function returns a 'MaterialApp' widget. 'MaterialApp' acts as a wrapper for material design widgets and defines properties like 'title', 'theme', and 'home'. The 'home' property loads 'MyHomePage', which is a 'StatefulWidget' that builds the actual UI (Scaffold, AppBar, Text widgets, FloatingActionButton).
Delete all the existing code in 'main.dart' except for the 'main' function. Instead of 'MyApp', pass a 'MaterialApp' widget directly to 'runApp'. This 'MaterialApp' will be the root widget and allow access to material design features. Inside 'MaterialApp', set the 'home' property to a 'Text' widget, displaying a simple string like "Hey ninjas". Add a comma after widget properties for proper formatting. Perform a hot reload to see the new blank app with the text on the emulator.