⚡ TL;DR
New to app development? Build your own Hello World app with Flutter step by step — install, code, run, and add interactivity. Let the coding adventures begin!
Greetings, aspiring app builders! In this step-by-step guide, we’ll create your very own “Hello World” app with Flutter — the framework that lets one codebase run on both Android and iOS. Whether you’re an experienced developer checking out Flutter or a complete beginner writing your first app, this walkthrough has you covered.
Step 1: Install Flutter
Before anything else, get Flutter running on your machine. Head to the official docs at https://docs.flutter.dev/get-started/install, pick your operating system, and follow the instructions — they cover the Flutter SDK plus the Android and iOS tooling you’ll need. Then install an editor: Visual Studio Code (with the Flutter extension) or Android Studio are the usual choices, and both give you a debugger and hot reload out of the box.
Once installed, open a terminal and verify everything is set up correctly:
flutter doctorflutter doctor checks your SDK, editor plugins, and device tooling, and tells you exactly what’s still missing. Fix anything marked with a warning before moving on — it saves an hour of confusion later.
Step 2: Create a New Project
With Flutter installed, create your project. The quickest way is from the terminal:
flutter create hello_world
cd hello_worldFlutter requires lowercase project names with underscores, so hello_world works where “HelloWorld2023” wouldn’t. (You can also use the “New Flutter Project” wizard in VS Code or Android Studio if you prefer a GUI.)
Step 3: Write the App
Open the lib folder — the heart of your app is main.dart. Delete the template code and replace it with this:
import 'package:flutter/material.dart';
void main() {
runApp(HelloWorldApp());
}
class HelloWorldApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
),
);
}
}runApp starts the app, MaterialApp provides the scaffolding, and Scaffold gives you the standard layout — an app bar up top and your centered “Hello, World!” text in the body.
Step 4: Run It
Pick a target: a simulator/emulator or a physical device. Start an Android emulator from Android Studio’s Device Manager, or open an iOS Simulator on a Mac. Then run:
flutter runAfter a first build that takes a minute or two, your Hello World app appears on the screen. Try editing the text and saving — hot reload updates the app instantly without losing its state.
Step 5: Customize Per Platform
One of Flutter’s selling points is that a single codebase produces both Android and iOS apps. You can still customize per platform when needed: platform-specific assets like app icons and splash screens live under android/ and ios/, and if you want widgets to match each platform’s native look, adaptive widgets or Theme.of(context).platform let you branch by OS. Most apps, though, look great with one consistent Material design on both platforms.
Step 6: Run on a Real Device
Emulators are convenient, but testing on a real phone catches things they miss. For Android, enable “USB debugging” in Developer Options, plug in your phone, and it shows up as a target for flutter run. For iOS, you’ll need a Mac with Xcode, an Apple ID (a free one works for development on your own device), and device trust enabled — the Flutter docs walk you through the exact steps.
Step 7: Adding Interactivity
A static label is a fine start — now let’s make the app respond to taps. Replace HelloWorldApp with a StatefulWidget:
import 'package:flutter/material.dart';
void main() {
runApp(HelloWorldApp());
}
class HelloWorldApp extends StatefulWidget {
State<HelloWorldApp> createState() => _HelloWorldAppState();
}
class _HelloWorldAppState extends State<HelloWorldApp> {
String message = "Hello, World!";
void changeMessage() {
setState(() {
message = "Welcome to Flutter!";
});
}
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
message,
style: TextStyle(fontSize: 24),
),
ElevatedButton(
onPressed: changeMessage,
child: Text('Change Message'),
),
],
),
),
),
);
}
}Tap the button and the message changes. The key idea is setState: it tells Flutter that the state changed, which re-runs build and redraws the screen. Note that we use ElevatedButton here — it’s the modern replacement for RaisedButton, which was deprecated and later removed from Flutter.
Step 8: Debugging and Testing
When something misbehaves, use your editor’s debugger — VS Code and Android Studio both support breakpoints, variable inspection, and the Flutter DevTools inspector. For automated checks, flutter test runs widget and unit tests, and the default project ships with a small example test you can learn from. Building the habit of writing a test when you fix a bug will pay off quickly.
Step 9: Congratulations, You’re a Flutter Developer!
You’ve built and run your own Hello World app with Flutter — installed the SDK, written a widget, used hot reload, added state, and even modernized a deprecated button. This is just the prologue. From here, the Flutter docs cover layouts, navigation, and networking, and your next natural milestone is a small app with two screens and a form.
Remember: every big app started as a single “Hello, World!“. Happy Fluttering!
Related Posts
- A Comprehensive Guide to Flutter Buttons: Choosing the Right One for Your App
- How to Change minSdkVersion in Flutter: 2 Simple Approaches
- Enhancing File Manipulation in Flutter: Best Practices and Examples
- Flutter Debug Banner Removal: Best Practices and Techniques
References
- Install Flutter — Flutter docs
- flutter doctor / Flutter installation troubleshooting — Flutter docs
- Write your first Flutter app — Flutter docs
- StatefulWidget and setState — Flutter docs
- Testing Flutter apps — Flutter docs
FAQ
How do I build a Hello World app in Flutter step by step?
Install the Flutter SDK, verify it with flutter doctor, then create a project with flutter create hello_world. Replace the code in lib/main.dart with a MaterialApp showing centered “Hello, World!” text, run flutter run on an emulator or phone, and use hot reload to see edits instantly. The whole process takes under an hour.
Do I need Android Studio to learn Flutter?
No — you can use Visual Studio Code with the Flutter extension instead. Android Studio is still useful because its Device Manager starts Android emulators, but the SDK, not the IDE, is what Flutter actually requires. Many beginners edit in VS Code and only open Android Studio when they need to manage emulator devices.
What does flutter doctor do?
flutter doctor is a diagnostic command that checks whether your Flutter development environment is complete. It inspects the SDK, your editor’s Flutter plugins, Android and iOS tooling, and connected devices, then reports anything missing or misconfigured. Running it right after installation and fixing every warning prevents most setup problems beginners hit later.
Can one Flutter codebase really run on both Android and iOS?
Yes — a single Flutter codebase compiles to native apps for both Android and iOS. Platform-specific assets such as app icons and splash screens live in separate android/ and ios/ folders, and you can branch widgets per platform when native styling matters. Testing on a real device for each OS is still recommended before release.

Written by Mihir Pipermitwala
Senior Full Stack Consultant & Mobile Engineering Specialist building user-focused applications in healthcare with Flutter, Dart and React Native. I write about what I actually build and test — every tutorial here comes from real project work.
More about Mihir →