variants property

Set<FItemVariant> variants
final

The variants used to resolve the style from FItemStyles.

Defaults to an empty set, which resolves to the base (primary) style. The current platform variant is automatically included during style resolution. To change the platform variant, update the enclosing FTheme.platform/FAdaptiveScope.platform.

For example, to create a destructive item:

FItem(
  variants: {FItemVariant.destructive},
  title: Text('Delete'),
)

Implementation

final Set<FItemVariant> variants;