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
+2 -1
View File
@@ -426,5 +426,6 @@
"sharePosterMode": "Generate QR poster",
"posterDownload": "Download poster image",
"posterSaved": "Poster saved to gallery",
"posterSaveFailed": "Failed to save poster"
"posterSaveFailed": "Failed to save poster",
"close": "Close"
}
@@ -2011,6 +2011,12 @@ abstract class AppLocalizations {
/// In zh, this message translates to:
/// **'海报保存失败'**
String get posterSaveFailed;
/// No description provided for @close.
///
/// In zh, this message translates to:
/// **'关闭'**
String get close;
}
class _AppLocalizationsDelegate
@@ -1028,4 +1028,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get posterSaveFailed => 'Failed to save poster';
@override
String get close => 'Close';
}
@@ -995,4 +995,7 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get posterSaveFailed => '海报保存失败';
@override
String get close => '关闭';
}
+2 -1
View File
@@ -426,5 +426,6 @@
"sharePosterMode": "生成二维码海报",
"posterDownload": "下载海报图",
"posterSaved": "海报已保存到相册",
"posterSaveFailed": "海报保存失败"
"posterSaveFailed": "海报保存失败",
"close": "关闭"
}
+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,