UI Basics

This section covers the basics of UI development in
Flutter and how it compares to SwiftUI.
This includes how to start developing your app, display static text,
create buttons, react to on-press events, display lists, grids, and more.

Getting started

In SwiftUI, you use App to start your app.

@main

struct

MyApp

App

var

body

some

Scene

WindowGroup

HomePage

()

Another common SwiftUI practice places the app body within a struct
that conforms to the View protocol as follows:

struct

HomePage

View

var

body

some

View

Text

"Hello, World!"