Your Adventure in Appland: Crafting a 'Hello World' App with Flutter

By Mihir Pipermitwala · · 7 min read

⚡ 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:

Copy
flutter doctor

flutter 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:

Copy
flutter create hello_world
cd hello_world

Flutter 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:

Copy
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:

Copy
flutter run

After 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:

Copy
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!

References

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.

Mihir Pipermitwala

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 →
Scroll down to load comments...
Related Blogs
Add an MCP Server to Your Flutter/Dart Tooling

Add an MCP Server to Your Flutter/Dart Tooling

Integrate a Model Context Protocol (MCP) server into your Flutter/Dart workflow. Step-by-step setup with Claude Code and real-world use cases.

AI TOOLSMCPFLUTTERDARTDEVELOPER TOOLS

October 06, 2026

Flutter On-Device LLM: Run Gemma & Llama Locally (2026)

Flutter On-Device LLM: Run Gemma & Llama Locally (2026)

Run on-device LLMs in Flutter using gemma_flutter and MediaPipe LLM Inference. No API keys, no internet — real-time AI on Android and iOS.

FLUTTERAI MLON DEVICE LLMGEMMALLAMA

September 24, 2026

How to Change minSdkVersion in Flutter: 2 Simple Approaches

How to Change minSdkVersion in Flutter: 2 Simple Approaches

Step-by-step guide to change the minSdkVersion in Flutter for Android. Learn how to configure local.properties or build.gradle for both new and old Flutter versions.

ANDROIDFLUTTERFLUTTER DEVELOPMENTMIN SDK VERSION

July 20, 2023

Unlocking Flutter's Potential: Best Practices for Writing Clean Code

Unlocking Flutter's Potential: Best Practices for Writing Clean Code

Unlock Flutter's potential with clean code. Learn best practices for writing maintainable Dart code, with examples and essential principles.

CLEAN CODECODE BEST PRACTICESCODE MAINTAINABILITYCODE ORGANIZATIONCODE READABILITY

June 02, 2023

Related Tutorials
Essential Git Skills: How to Delete Remote Branches

Essential Git Skills: How to Delete Remote Branches

Keep your repository clean and organized. This guide walks you through how to delete both local and remote branches in Git, step by step.

BITBUCKETDELETE LOCAL BRANCHDELETE REMOTE BRANCHGITGIT BRANCH CLEANUP AUTOMATION

June 12, 2024

A Comprehensive Guide to Flutter Buttons: Choosing the Right One for Your App

A Comprehensive Guide to Flutter Buttons: Choosing the Right One for Your App

Complete guide to Flutter Button widgets. Learn how to use ElevatedButton, TextButton, OutlinedButton, IconButton, CupertinoButton, and FAB with examples.

CUPERTINO BUTTONELEVATED BUTTONFLOATING ACTION BUTTONFLUTTERFLUTTER BUTTON

April 17, 2024

Show an Offline Message for No Internet in Flutter

Show an Offline Message for No Internet in Flutter

You have to use the 'Connectivity Flutter Package' to achieve this feature on your App. This package helps to know whether your device is online or offline.

CONNECTIVITY PLUSDEPENDENCIESFLUTTERFLUTTER DEVELOPMENTFLUTTER PACKAGES

April 09, 2024

Mastering TabBar & TabBarView in Flutter: A Complete Guide

Mastering TabBar & TabBarView in Flutter: A Complete Guide

Implement TabBar and TabBarView in Flutter step by step — customize tab indicators, enable scrollable tabs, and change tabs programmatically.

CODINGDEFAULT TAB CONTROLLERFLUTTERLEARN TO CODETAB CONTROLLER

July 26, 2023

Related Recommended Services
Visual Studio Code for the Web

Visual Studio Code for the Web

Build with Visual Studio Code, anywhere, anytime, in your browser.

IDEVISUAL STUDIOVISUAL STUDIO CODEWEB
Renovate | Automated Dependency Updates

Renovate | Automated Dependency Updates

Renovate Bot keeps source code dependencies up-to-date using automated Pull Requests.

AUTOMATED DEPENDENCY UPDATESBUNDLERCOMPOSERGITHUBGO MODULES
Best XML Formatter and XML Beautifier

Best XML Formatter and XML Beautifier

Online XML Formatter will format xml data, helps to validate, and works as XML Converter. Save and Share XML.

XMLXML BEAUTIFIERXML CONVERTERXML FORMATXML FORMATTER
Kubecost | Kubernetes cost monitoring and management

Kubecost | Kubernetes cost monitoring and management

Kubecost started in early 2019 as an open-source tool to give developers visibility into Kubernetes spend. We maintain a deep commitment to building and supporting dedicated solutions for the open source community.

CLOUDKUBECOSTKUBERNETESOPEN SOURCESELF HOSTED
Related Recommended Stories
How GitHub reduced testing time for iOS apps with new runner features

How GitHub reduced testing time for iOS apps with new runner features

Learn how GitHub used macOS and Apple Silicon runners for GitHub Actions to build, test, and deploy our iOS app faster.

IOSGITHUBTESTINGRUNNER
5 ways to transform your workflow using GitHub Copilot and MCP

5 ways to transform your workflow using GitHub Copilot and MCP

Learn how to streamline your development workflow with five different MCP use cases.

AGENT MODECODING AGENTCOPILOTFIGMAGITHUB
One weird trick for powerful Git aliases

One weird trick for powerful Git aliases

Advanced Git Aliases

ALIASALIAS TEMPLATEATLASSIANBITBUCKETGIT
Awesome Python

Awesome Python

An opinionated list of awesome Python frameworks, libraries, software and resources

AWESOMEAWESOME PYTHONCOLLECTIONSGITHUBPYTHON
Related Recommended Tools
Find out what websites are built with - Wappalyzer

Find out what websites are built with - Wappalyzer

Find out the technology stack of any website. Create lists of websites and contacts by the technologies they use.

ADD ONSANALYTICSAPP STOREAPPLEBOOKING
Sourcetree | Free Git GUI for Mac and Windows

Sourcetree | Free Git GUI for Mac and Windows

A Git GUI that offers a visual representation of your repositories. Sourcetree is a free Git client for Windows and Mac.

GITGITHUBGITLABATLASSIANBITBUCKET
Related Recommended Videos