variant property

FToastVariant variant
final

The variants used to resolve the style from FToastStyles.

Defaults to FToastVariant.primary. 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 toast:

FToast(
  variant: .destructive,
  title: Text('Something went wrong'),
)

Implementation

final FToastVariant variant;