chore: regenerate

This commit is contained in:
Richard Shiue 2025-03-11 22:18:36 +08:00
parent f8f9c3404a
commit 75dd5c1d93

View File

@ -260,9 +260,12 @@ class _ChangeFormatButtonState extends State<ChangeFormatButton> {
constraints: const BoxConstraints(), constraints: const BoxConstraints(),
onClose: () => widget.onOverrideVisibility?.call(false), onClose: () => widget.onOverrideVisibility?.call(false),
child: buildButton(context), child: buildButton(context),
popupBuilder: (_) => _ChangeFormatPopoverContent( popupBuilder: (_) => BlocProvider.value(
value: context.read<AIPromptInputBloc>(),
child: _ChangeFormatPopoverContent(
onRegenerate: widget.onRegenerate, onRegenerate: widget.onRegenerate,
), ),
),
); );
} }
@ -359,12 +362,17 @@ class _ChangeFormatPopoverContentState
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
ChangeFormatBar( BlocBuilder<AIPromptInputBloc, AIPromptInputState>(
builder: (context, state) {
return ChangeFormatBar(
spacing: 2.0, spacing: 2.0,
showImageFormats: state.aiType.isCloud,
predefinedFormat: predefinedFormat, predefinedFormat: predefinedFormat,
onSelectPredefinedFormat: (format) { onSelectPredefinedFormat: (format) {
setState(() => predefinedFormat = format); setState(() => predefinedFormat = format);
}, },
);
},
), ),
const HSpace(4.0), const HSpace(4.0),
FlowyTooltip( FlowyTooltip(