Flutter has its own implementations of each UI control, rather than deferring to
those provided by the system: for example, there is a pure Dart
implementation of both the
iOS Switch
control
and the one for the
Android equivalent.

This approach provides several benefits:

Provides for unlimited extensibility. A developer who wants a variant of the
Switch control can create one in any arbitrary way, and is not limited to the
extension points provided by the OS.

Avoids a significant performance bottleneck by allowing Flutter to composite
the entire scene at once, without transitioning back and forth between Flutter
code and platform code.

Decouples the application behavior from any operating system dependencies. The
application looks and feels the same on all versions of the OS, even if the OS
changed the implementations of its controls.

Composition

Widgets are typically composed of many other small, single-purpose widgets that
combine to produce powerful effects.