fix(app): poster sheet close button — header row with explicit close (drag-down not obvious on long sheet)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-23 11:32:02 +08:00
parent d11ca16d1d
commit 4d31eaf184
6 changed files with 34 additions and 3 deletions
+18 -1
View File
@@ -52,7 +52,8 @@ typedef ShareLauncher = Future<void> Function(String text);
final shareLauncherProvider = Provider<ShareLauncher>(
// share_plus 11:SharePlus.instance.share(旧 Share.share 已废弃)。
(ref) => (text) async => SharePlus.instance.share(
(ref) =>
(text) async => SharePlus.instance.share(
ShareParams(text: text, subject: text.split('\n').first),
),
);
@@ -332,6 +333,22 @@ class _PosterSheetState extends ConsumerState<_PosterSheet> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// ── 头行:标题 + 显式关闭(海报较长时下拉手势不明显)──
Row(
children: [
Expanded(
child: Text(
l10n.sharePosterMode,
style: theme.textTheme.titleMedium,
),
),
IconButton(
tooltip: l10n.close,
icon: const Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
],
),
// ── 海报(整块 RepaintBoundary;下载即渲染此区域)──
RepaintBoundary(
key: _posterKey,