The following example shows how to display a simple widget with padding:

You can add padding to any widget,
which mimics the functionality of constraints in iOS.

You can view the layouts that Flutter has to offer
in the widget catalog.

Removing Widgets

In UIKit, you call addSubview() on the parent,
or removeFromSuperview() on a child view
to dynamically add or remove child views.
In Flutter, because widgets are immutable,
there is no direct equivalent to addSubview().
Instead, you can pass a function to the parent
that returns a widget, and control that child’s creation
with a boolean flag.

The following example shows how to toggle between two widgets
when the user clicks the FloatingActionButton:

Animations

In UIKit, you create an animation by calling the
animate(withDuration:animations:) method on a view.
In Flutter, use the animation library
to wrap widgets inside an animated widget.