AdaptiveControl
Inherits: Control
Base class for controls that support adaptive behavior, which allows them to adjust their appearance and behavior based on the target platform (ex: Material design on Android/Windows/Linux, Cupertino design on iOS/macOS).
The adaptive
property is applicable in two common scenarios:
-
Platform-adaptive controls: These controls have a corresponding version on both Material and Cupertino platforms. When
adaptive
is set toTrue
, the control renders the appropriate platform-specific implementation. -
Container controls: Controls that contain children (ex:
Row
,Column
) can pass theadaptive
value down to their children that do not explicitly define it themselves. This enables nested adaptive behavior in complex layouts.
Extension developers can use this base class to create their own adaptive controls
by checking the adaptive
flag at runtime and rendering accordingly.
Note
This class does not implement any platform-specific rendering itself.
It is up to the control inheriting from it to interpret the adaptive
flag and render accordingly.
Properties