fix(flutter): 移除搜索框识剧入口
This commit is contained in:
1 parent
5a51af4264
commit
5e2fba1746
12 files changed
+9
-84
No files matched your search
@@ -30,7 +30,6 @@
|
||||
"actionGenre": "Action",
|
||||
"filter": "Filter",
|
||||
"reserve": "Reserve",
|
||||
"identifyDrama": "Identify",
|
||||
"heatLabel": "{count} heat",
|
||||
"@heatLabel": {
|
||||
"placeholders": {
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
"actionGenre": "Aksi",
|
||||
"filter": "Filter",
|
||||
"reserve": "Reservasi",
|
||||
"identifyDrama": "Identifikasi",
|
||||
"heatLabel": "{count} panas",
|
||||
"topCharts": "Peringkat Teratas",
|
||||
"newReleases": "Rilisan Baru",
|
||||
|
||||
@@ -280,12 +280,6 @@ abstract class AppLocalizations {
|
||||
/// **'Reserve'**
|
||||
String get reserve;
|
||||
|
||||
/// No description provided for @identifyDrama.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Identify'**
|
||||
String get identifyDrama;
|
||||
|
||||
/// No description provided for @heatLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -101,9 +101,6 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get reserve => 'Reserve';
|
||||
|
||||
@override
|
||||
String get identifyDrama => 'Identify';
|
||||
|
||||
@override
|
||||
String heatLabel(String count) {
|
||||
return '$count heat';
|
||||
|
||||
@@ -101,9 +101,6 @@ class AppLocalizationsId extends AppLocalizations {
|
||||
@override
|
||||
String get reserve => 'Reservasi';
|
||||
|
||||
@override
|
||||
String get identifyDrama => 'Identifikasi';
|
||||
|
||||
@override
|
||||
String heatLabel(String count) {
|
||||
return '$count panas';
|
||||
|
||||
@@ -98,9 +98,6 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get reserve => '预约';
|
||||
|
||||
@override
|
||||
String get identifyDrama => '识剧';
|
||||
|
||||
@override
|
||||
String heatLabel(String count) {
|
||||
return '$count热度';
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
"actionGenre": "动作",
|
||||
"filter": "筛选",
|
||||
"reserve": "预约",
|
||||
"identifyDrama": "识剧",
|
||||
"heatLabel": "{count}热度",
|
||||
"topCharts": "排行榜",
|
||||
"newReleases": "新剧",
|
||||
|
||||
@@ -106,7 +106,6 @@ class _DiscoverPageState extends State<DiscoverPage> {
|
||||
focusNode: logic.searchFocus,
|
||||
onChanged: (_) => logic.onSearchChanged(),
|
||||
loading: logic.searchLoading,
|
||||
onIdentify: () => _showComingSoon(l10n),
|
||||
),
|
||||
Expanded(child: _feed(l10n, categories)),
|
||||
if (!embedded) _bottomNav(l10n),
|
||||
|
||||
@@ -13,14 +13,12 @@ class DiscoverHeader extends StatelessWidget {
|
||||
required this.focusNode,
|
||||
required this.onChanged,
|
||||
required this.loading,
|
||||
required this.onIdentify,
|
||||
});
|
||||
|
||||
final TextEditingController controller;
|
||||
final FocusNode focusNode;
|
||||
final ValueChanged<String> onChanged;
|
||||
final bool loading;
|
||||
final VoidCallback onIdentify;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -32,7 +30,6 @@ class DiscoverHeader extends StatelessWidget {
|
||||
focusNode: focusNode,
|
||||
onChanged: onChanged,
|
||||
loading: loading,
|
||||
onIdentify: onIdentify,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_dimens.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
const double _searchHeight = 40;
|
||||
const double _searchRadius = 18;
|
||||
|
||||
/// 剧场顶部搜索框:右侧内嵌「识剧」入口。
|
||||
/// 剧场顶部整行搜索框。
|
||||
class DiscoverSearchField extends StatelessWidget {
|
||||
const DiscoverSearchField({
|
||||
super.key,
|
||||
@@ -17,7 +16,6 @@ class DiscoverSearchField extends StatelessWidget {
|
||||
required this.focusNode,
|
||||
required this.onChanged,
|
||||
required this.loading,
|
||||
required this.onIdentify,
|
||||
this.horizontalPadding = 14,
|
||||
});
|
||||
|
||||
@@ -25,7 +23,6 @@ class DiscoverSearchField extends StatelessWidget {
|
||||
final FocusNode focusNode;
|
||||
final ValueChanged<String> onChanged;
|
||||
final bool loading;
|
||||
final VoidCallback onIdentify;
|
||||
final double horizontalPadding;
|
||||
|
||||
@override
|
||||
@@ -53,17 +50,14 @@ class DiscoverSearchField extends StatelessWidget {
|
||||
color: AppColors.subtle,
|
||||
size: 17,
|
||||
),
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
child: loading
|
||||
? const SizedBox.square(
|
||||
dimension: 18,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
)
|
||||
: _identifyPill(context),
|
||||
),
|
||||
suffixIcon: loading
|
||||
? const SizedBox.square(
|
||||
dimension: 18,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
suffixIconConstraints: const BoxConstraints(
|
||||
minWidth: 0,
|
||||
minHeight: 0,
|
||||
@@ -82,38 +76,4 @@ class DiscoverSearchField extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _identifyPill(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 7),
|
||||
child: Material(
|
||||
color: AppColors.raised,
|
||||
borderRadius: BorderRadius.circular(AppDimens.pillRadius),
|
||||
child: InkWell(
|
||||
key: const Key('discover-identify'),
|
||||
onTap: onIdentify,
|
||||
borderRadius: BorderRadius.circular(AppDimens.pillRadius),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.center_focus_weak_rounded,
|
||||
color: AppColors.muted,
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
l10n.identifyDrama,
|
||||
style: const TextStyle(color: AppColors.muted, fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user