Skip to content

FlowGreeting is the zero state’s headline over an empty thread. Where there is room it sets a 40px glyph beside 32px text, bottom-aligned; below 600px of available width it restacks itself — glyph above the text, at the design’s 21px. The host supplies the whole string (name and all); FlowChatScreen centres it when the conversation hasn’t started.

The wide form
FlowGreeting(
// Wide form: 40px glyph beside 32px text, bottom-aligned.
icon: Icons.wb_twilight,
text: 'Good Afternoon, Divyanshu',
)

The restack is driven by available width, not screen size — box the greeting narrower and it adapts:

Below 600px it restacks
// Below 600px of available width the greeting restacks itself:
// glyph above the text, at the design's 21px.
SizedBox(
width: 390,
child: FlowGreeting(
icon: Icons.wb_twilight,
text: 'Good Afternoon, Divyanshu',
),
)
No glyph
FlowGreeting(text: 'Welcome back')

An explicit textStyle is used as given in both forms — the responsive sizing steps aside when you take control:

Restyled
FlowGreeting(
icon: Icons.auto_awesome_outlined,
iconColor: colors.onSurfaceVariant,
text: 'Ready when you are',
// An explicit style is used as given in both forms.
textStyle: typography.headlineSmall.copyWith(
color: colors.onSurfaceVariant,
),
)
  • text — the whole headline; the package composes no copy.
  • icon, iconColor — the optional glyph.
  • textStyle — overrides the responsive sizing outright.
  • In the assembled surface: pass it to FlowChatScreen’s greeting: slot, shown only while empty is true.