adaptivePlatformDensity property

VisualDensity get adaptivePlatformDensity

Returns a VisualDensity that is adaptive based on the current platform on which the framework is executing, from defaultTargetPlatform.

When defaultTargetPlatform is a desktop platform, this returns compact, and for other platforms, it returns a default-constructed VisualDensity.

See also:

Implementation

static VisualDensity get adaptivePlatformDensity => defaultDensityForPlatform(defaultTargetPlatform);