Skip to content

基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。

fix: rating_review_dialog and source_sheet ui bug (#2144)

玲羽a704b575c0ae
diff --git a/lib/pages/info/rating_review_dialog.dart b/lib/pages/info/rating_review_dialog.dart
index 392b6848..b65967c1 100644
--- a/lib/pages/info/rating_review_dialog.dart
+++ b/lib/pages/info/rating_review_dialog.dart
@@ -333,17 +333,21 @@ class _RatingReviewDialogState extends State<RatingReviewDialog> {
}
Widget _buildMainPane(ThemeData theme, {required bool scrollContent}) {
- return Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- _buildMainHeader(theme),
- if (scrollContent)
- Flexible(child: _buildMainScrollContent(theme))
- else
- _buildMainScrollContent(theme, shrinkWrap: true),
- _buildActions(theme),
- ],
+ return SizedBox.expand(
+ child: Column(
+ children: [
+ _buildMainHeader(theme),
+
+ Expanded(
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.fromLTRB(24, 8, 24, 16),
+ child: _buildMainContent(theme),
+ ),
+ ),
+
+ _buildActions(theme),
+ ],
+ ),
);
}
@@ -381,22 +385,6 @@ class _RatingReviewDialogState extends State<RatingReviewDialog> {
);
}
- Widget _buildMainScrollContent(
- ThemeData theme, {
- bool shrinkWrap = false,
- }) {
- final content = Padding(
- padding: const EdgeInsets.fromLTRB(24, 8, 24, 16),
- child: _buildMainContent(theme),
- );
-
- if (shrinkWrap) {
- return content;
- }
-
- return SingleChildScrollView(child: content);
- }
-
Widget _buildMainContent(ThemeData theme) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
diff --git a/lib/pages/info/source_sheet.dart b/lib/pages/info/source_sheet.dart
index 6aa88509..f5bdfcc0 100644
--- a/lib/pages/info/source_sheet.dart
+++ b/lib/pages/info/source_sheet.dart
@@ -346,56 +346,59 @@ class _SourceSheetState extends State<SourceSheet>
/// 构建结果列表底部补充检索入口,便于已有结果不准确时换用别名或手动检索关键词
Widget showSupplementarySearchEntry(String pluginName) {
- return Padding(
- padding: const EdgeInsets.fromLTRB(18, 4, 18, 12),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- Align(
- alignment: Alignment.centerRight,
- child: Wrap(
- crossAxisAlignment: WrapCrossAlignment.center,
- spacing: 2,
- runSpacing: 4,
- children: [
- Text(
- '结果不准确?',
- style: Theme.of(context).textTheme.bodySmall?.copyWith(
- color: Theme.of(context)
- .textTheme
- .bodySmall
- ?.color
- ?.withValues(alpha: 0.75),
- ),
- ),
- TextButton(
- style: TextButton.styleFrom(
- minimumSize: Size.zero,
- padding:
- const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
- tapTargetSize: MaterialTapTargetSize.shrinkWrap,
- visualDensity: VisualDensity.compact,
- textStyle: Theme.of(context).textTheme.bodySmall,
+ return SafeArea(
+ top: false,
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(18, 4, 18, 12),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Align(
+ alignment: Alignment.centerRight,
+ child: Wrap(
+ crossAxisAlignment: WrapCrossAlignment.center,
+ spacing: 2,
+ runSpacing: 4,
+ children: [
+ Text(
+ '结果不准确?',
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ color: Theme.of(context)
+ .textTheme
+ .bodySmall
+ ?.color
+ ?.withValues(alpha: 0.75),
+ ),
),
- onPressed: () => showAliasSearchDialog(pluginName),
- child: const Text('别名检索'),
- ),
- TextButton(
- style: TextButton.styleFrom(
- minimumSize: Size.zero,
- padding:
- const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
- tapTargetSize: MaterialTapTargetSize.shrinkWrap,
- visualDensity: VisualDensity.compact,
- textStyle: Theme.of(context).textTheme.bodySmall,
+ TextButton(
+ style: TextButton.styleFrom(
+ minimumSize: Size.zero,
+ padding:
+ const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
+ tapTargetSize: MaterialTapTargetSize.shrinkWrap,
+ visualDensity: VisualDensity.compact,
+ textStyle: Theme.of(context).textTheme.bodySmall,
+ ),
+ onPressed: () => showAliasSearchDialog(pluginName),
+ child: const Text('别名检索'),
),
- onPressed: () => showCustomSearchDialog(pluginName),
- child: const Text('手动检索'),
- ),
- ],
+ TextButton(
+ style: TextButton.styleFrom(
+ minimumSize: Size.zero,
+ padding:
+ const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
+ tapTargetSize: MaterialTapTargetSize.shrinkWrap,
+ visualDensity: VisualDensity.compact,
+ textStyle: Theme.of(context).textTheme.bodySmall,
+ ),
+ onPressed: () => showCustomSearchDialog(pluginName),
+ child: const Text('手动检索'),
+ ),
+ ],
+ ),
),
- ),
- ],
+ ],
+ ),
),
);
}