From b3b873ffcec56eeb578fdfa554d248a18b355c7a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 1 Oct 2026 11:33:10 -0400 Subject: [PATCH] hardcode `padding` in order to make `PopupMenuButton` actually `.narrow` This is needed because of a flutter bug, see https://github.com/flutter/flutter/issues/193656. --- lib/widgets/composer/composer.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/widgets/composer/composer.dart b/lib/widgets/composer/composer.dart index 8664e4d..e485fba 100644 --- a/lib/widgets/composer/composer.dart +++ b/lib/widgets/composer/composer.dart @@ -141,8 +141,11 @@ class const Composer( icon: Icon(Icons.emoji_emotions), ), PopupMenuButton( - style: .new(iconButtonWidth: .narrow), tooltip: "Add media", + + // `style` has no effect due to https://github.com/flutter/flutter/issues/193656, so `padding` is set from material_ui/lib/src/generated/icon_button_defaults_m3e.g.dart manually. + padding: .fromSTEB(4.0, 6.0, 4.0, 6.0), + style: .new(iconButtonWidth: .narrow), enabled: attachment == null, itemBuilder: (context) => [ if (Platform.isAndroid || Platform.isIOS)