resolveFluentToastState function
FluentToastState
resolveFluentToastState({
- required Widget title,
- FluentToastIntent intent = FluentToastIntent.info,
- FluentToastType type = FluentToastType.dismiss,
- bool showIcon = true,
- Widget? icon,
- Widget? body,
- Widget? subtitle,
- Widget? end,
Builds the state a toast will be styled and rendered from.
The first of the three-function recomposition contract, and the only place
the default glyph is chosen: icon overrides FluentToastIntent.glyph, and
showIcon: false suppresses the glyph altogether.
Implementation
FluentToastState resolveFluentToastState({
required Widget title,
FluentToastIntent intent = FluentToastIntent.info,
FluentToastType type = FluentToastType.dismiss,
bool showIcon = true,
Widget? icon,
Widget? body,
Widget? subtitle,
List<Widget> footer = const <Widget>[],
Widget? end,
}) {
final glyph = intent.glyph;
return FluentToastState(
title: title,
intent: intent,
type: type,
icon: showIcon ? (icon ?? (glyph == null ? null : Icon(glyph))) : null,
body: body,
subtitle: subtitle,
footer: footer,
end: end,
);
}