Overview

Flutter and SwiftUI code describes how the UI looks and works.
Developers call this type of code a declarative framework.

Views vs. Widgets

SwiftUI represents UI components as views.
You configure views using modifiers.

Text

"Hello, World!"

// <-- This is a View

padding

10

// <-- This is a modifier of that View

Flutter represents UI components as widgets.

Both views and widgets only exist until they need to be changed.
These languages call this property immutability.
SwiftUI represents a UI component property as a View modifier.
By contrast, Flutter uses widgets for both UI components and
their properties.

Padding

// <-- This is a Widget

padding:

EdgeInsets

all