How to create first Flutter app in Flutter 2.10
Flutter Slider

How to create first Flutter app in Flutter 2.10

Flutter is a user interface toolkit from Google that allows you to create attractive natively built apps for mobile, web, and desktop from a single codebase. Flutter is open source and free, and it combines with existing code. It is adopted by developers and organizations all over the world. You can learn more about Flutter from the best Flutter training in Kochi and build your successful mobile app developer career in Flutter.

Step 1. Create a Flutter environment.

To finish this lab, you’ll need two pieces of software: the Flutter SDK(2.10)and an editor. We can choose Android Studio or Visual Studio Code as your editor.

You can use any of the following devices to run the Flutter app:

  • An actual Android or iOS device that has been configured to developer mode and is linked to your computer
  • Simulator for iOS (requires installing Xcode tools)
  • Emulator for Android (requires setup in Android Studio)
  • A web browser (Chrome is required for debugging)

Step 2. Create your First Flutter application

We can create a Flutter application using the following commands through terminal/command prompt.

Syntax:

flutter create application_name

Example:

flutter create flutter_starteup_application

Step 3. Change the directory through terminal/command prompt.

Syntax:

cd application_name

Example:

cd flutter_starteup_application

Step 4. Open the projects through Android Studio/Visual Studio Code

Step 5. After opening the project, we mostly edit only the lib folder.

  1. To begin programming with Flutter, you must first import the Flutter package. We’ve imported a Material package in this case. This package allows you to build user interfaces that follow Android’s Material design principles.
  2. The second line, like the main method in other programming languages, is an entry point for Flutter applications. It uses the runApp function and passes it a MyApp object. This function’s main purpose is to attach the specified widget to the screen.

Step 6. Run the application using the run icon or through commands

Syntax:

flutter run

We can choose the device to see the output

Step 7. Try to make some changes in theme or color schemes and save the file.

The output shows the changes within milliseconds this property of Flutter is called Hot Reload and Hot Restart

You can opt for a course from Flutter online training in Kochi is one of the best course that every developer desires to master in Flutter and build a successful career as a Flutter developer.

Author: STEPS