Thuta Learning
BasicMobile Developmentbeginner

Hello World App

Relax. We'll talk through this in plain words — no textbook voice.

The Hello World app is where you see the basic skeleton of a Flutter project. Once you understand main(), runApp(), StatelessWidget, build(), MaterialApp, Scaffold, Center, and Text, you'll be able to read the bare bones of any Flutter page.

dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Hello, World!'),
        ),
      ),
    );
  }
}
You should see
On the emulator or browser preview, you'll see the text "Hello, World!" in the middle of the screen.

What's Next

In the next lesson, take a closer look at the Widget concept — the heart and soul of Flutter.

Easy traps

  • If your build() method doesn't return a widget, the app won't render. The Dart analyzer will flag this as an error.
Hello World App | Thuta Learning