# void runApp(Widget app)  / StatelessWidget

We can think of widgets as Lego blocks.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671280282590/ZeIvTsYub.png align="center")

# Official widgets / Community widgets

There are **official widgets** such as animation and input. There are also widgets created by the community.

Creating a widget is, after all, creating a class.

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

void main() {
  runApp(App());
}

class App extends StatelessWidget{

}
```

# StatelessWidget

## root widget

## build()

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

void main() {
  runApp(App());
}

class App extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
           home:Scaffold(
            body: Text('Hello world!')),

        ); 
  }
}
```

What we need to do here is to return a widget called **MaterialApp(Google)** or a widget called **CupertinoApp(Apple)**.
