Greeting
The zero state's headline — a glyph beside the text, restacking when compact.
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.
Default
Section titled “Default”FlowGreeting( // Wide form: 40px glyph beside 32px text, bottom-aligned. icon: Icons.wb_twilight, text: 'Good Afternoon, Divyanshu',)Compact
Section titled “Compact”The restack is driven by available width, not screen size — box the greeting narrower and it adapts:
// 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', ),)Text only
Section titled “Text only”FlowGreeting(text: 'Welcome back')Custom style
Section titled “Custom style”An explicit textStyle is used as given in both forms — the responsive
sizing steps aside when you take control:
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, ),)Key API
Section titled “Key API”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’sgreeting:slot, shown only whileemptyis true.