logo和名称替换
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/hj_utils/const.dart';
|
||||
import 'package:hgmj/hj_utils/history_util.dart';
|
||||
import 'package:wydj/hj_utils/const.dart';
|
||||
import 'package:wydj/hj_utils/history_util.dart';
|
||||
|
||||
import 'search_result_page/search_result_main_page.dart';
|
||||
|
||||
@@ -51,7 +51,8 @@ class SearchMainLogic extends GetxController {
|
||||
Future<void> onSubmitted(String text) async {
|
||||
searchTextCtr.text = text;
|
||||
HistoryUtil.addSearch(text); //不 await:落盘不该挡住跳转,返回时早已写完
|
||||
await Get.to(() => SearchResultMainPage(text, initialType: initialResultType));
|
||||
await Get.to(
|
||||
() => SearchResultMainPage(text, initialType: initialResultType));
|
||||
loadHistories();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/hj_utils/const.dart';
|
||||
import 'package:hgmj/tools_base/banner/ads_grid_view.dart';
|
||||
import 'package:wydj/hj_utils/const.dart';
|
||||
import 'package:wydj/tools_base/banner/ads_grid_view.dart';
|
||||
|
||||
import '../../find/rank_module/rank_main_page.dart';
|
||||
import '../../find/rank_module/rank_sub_page.dart';
|
||||
@@ -39,7 +39,8 @@ class SearchMainPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: NestedScrollView(
|
||||
headerSliverBuilder: (_, __) => _headerSlivers(logic),
|
||||
body: const RankSubPage(pageType: MediaStyle.Video, sortType: 2), // 2 = 周榜
|
||||
body: const RankSubPage(
|
||||
pageType: MediaStyle.Video, sortType: 2), // 2 = 周榜
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -71,7 +72,8 @@ class SearchMainPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
//热搜词
|
||||
SliverToBoxAdapter(child: SearchHotTagView(onTagClick: logic.onSubmitted)),
|
||||
SliverToBoxAdapter(
|
||||
child: SearchHotTagView(onTagClick: logic.onSubmitted)),
|
||||
//「热门排行」标题行,右侧跳完整排行榜页
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
@@ -80,12 +82,16 @@ class SearchMainPage extends StatelessWidget {
|
||||
children: [
|
||||
const Text(
|
||||
'热门排行',
|
||||
style: TextStyle(color: Color(0xE5FFFFFF), fontSize: 18, fontWeight: FontWeight.w600),
|
||||
style: TextStyle(
|
||||
color: Color(0xE5FFFFFF),
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
const Spacer(),
|
||||
InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () => Get.to(() => const RankMainPage(), preventDuplicates: false),
|
||||
onTap: () => Get.to(() => const RankMainPage(),
|
||||
preventDuplicates: false),
|
||||
child: Container(
|
||||
width: 54,
|
||||
height: 18,
|
||||
@@ -93,8 +99,13 @@ class SearchMainPage extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(left: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text('更多', style: TextStyle(color: Colors.white.withValues(alpha: 0.55), fontSize: 14)),
|
||||
Icon(Icons.navigate_next, size: 22, color: Colors.white.withValues(alpha: 0.55)),
|
||||
Text('更多',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.55),
|
||||
fontSize: 14)),
|
||||
Icon(Icons.navigate_next,
|
||||
size: 22,
|
||||
color: Colors.white.withValues(alpha: 0.55)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hgmj/hj_utils/api_service/acg_service.dart';
|
||||
import 'package:hgmj/hj_utils/const.dart';
|
||||
import 'package:hgmj/tools_base/debug_log.dart';
|
||||
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:wydj/hj_utils/api_service/acg_service.dart';
|
||||
import 'package:wydj/hj_utils/const.dart';
|
||||
import 'package:wydj/tools_base/debug_log.dart';
|
||||
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../../../hj_model/acg/cartoon_more_list.dart';
|
||||
@@ -40,15 +40,20 @@ class _SearchACGResultPageState extends State<SearchACGResultPage> {
|
||||
|
||||
_loadData({int page = 1, int size = 12}) async {
|
||||
try {
|
||||
MediaSearchListModel? retResp =
|
||||
await ACGService.mediaSearch(keyword: widget.keywords, page: page, size: size, kind: widget.type.searchKind);
|
||||
MediaSearchListModel? retResp = await ACGService.mediaSearch(
|
||||
keyword: widget.keywords,
|
||||
page: page,
|
||||
size: size,
|
||||
kind: widget.type.searchKind);
|
||||
pageNumber = page;
|
||||
videoList ??= [];
|
||||
if (page == 1) {
|
||||
videoList?.clear();
|
||||
}
|
||||
videoList?.addAll(retResp?.list ?? []);
|
||||
retResp?.hasNext == false ? refreshController?.loadNoData() : refreshController?.loadComplete();
|
||||
retResp?.hasNext == false
|
||||
? refreshController?.loadNoData()
|
||||
: refreshController?.loadComplete();
|
||||
} catch (e) {
|
||||
refreshController?.loadComplete();
|
||||
debugLog(e);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hgmj/hj_utils/const.dart';
|
||||
import 'package:hgmj/hj_utils/history_util.dart';
|
||||
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
|
||||
import 'package:wydj/hj_utils/const.dart';
|
||||
import 'package:wydj/hj_utils/history_util.dart';
|
||||
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
|
||||
|
||||
import '../../../../tools_base/indicator/custom_tab_indicator.dart';
|
||||
import '../widget/search_app_bar.dart';
|
||||
@@ -22,7 +22,8 @@ class SearchResultMainPage extends StatefulWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _SearchResultMainPageState extends State<SearchResultMainPage> with SingleTickerProviderStateMixin {
|
||||
class _SearchResultMainPageState extends State<SearchResultMainPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
final typeList = ['影片', '短剧', '抖音', '漫画', '动漫', '帖子', '图集'];
|
||||
|
||||
late final TabController tabCtr;
|
||||
@@ -86,20 +87,49 @@ class _SearchResultMainPageState extends State<SearchResultMainPage> with Single
|
||||
padding: EdgeInsets.zero,
|
||||
isScrollable: false,
|
||||
labelPadding: EdgeInsets.zero,
|
||||
indicator: const CustomIndicator(height: 4, width: 16, isGradient: true, offsetY: 4),
|
||||
indicator: const CustomIndicator(
|
||||
height: 4, width: 16, isGradient: true, offsetY: 4),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: tabCtr,
|
||||
children: [
|
||||
SearchVideoResultPage(key: ValueKey("0$keywords"), keywords: keywords, type: MediaStyle.Video).keepAlive,
|
||||
SearchVideoResultPage(key: ValueKey("1$keywords"), keywords: keywords, type: MediaStyle.Drama).keepAlive,
|
||||
SearchVideoResultPage(key: ValueKey("2$keywords"), keywords: keywords, type: MediaStyle.ShortVideo).keepAlive,
|
||||
SearchACGResultPage(key: ValueKey("3$keywords"), keywords: keywords, type: MediaStyle.Comics).keepAlive,
|
||||
SearchACGResultPage(key: ValueKey("4$keywords"), keywords: keywords, type: MediaStyle.Cartoon).keepAlive,
|
||||
SearchVideoResultPage(key: ValueKey("5$keywords"), keywords: keywords, type: MediaStyle.Community).keepAlive,
|
||||
SearchVideoResultPage(key: ValueKey("6$keywords"), keywords: keywords, type: MediaStyle.Pic).keepAlive,
|
||||
SearchVideoResultPage(
|
||||
key: ValueKey("0$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Video)
|
||||
.keepAlive,
|
||||
SearchVideoResultPage(
|
||||
key: ValueKey("1$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Drama)
|
||||
.keepAlive,
|
||||
SearchVideoResultPage(
|
||||
key: ValueKey("2$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.ShortVideo)
|
||||
.keepAlive,
|
||||
SearchACGResultPage(
|
||||
key: ValueKey("3$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Comics)
|
||||
.keepAlive,
|
||||
SearchACGResultPage(
|
||||
key: ValueKey("4$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Cartoon)
|
||||
.keepAlive,
|
||||
SearchVideoResultPage(
|
||||
key: ValueKey("5$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Community)
|
||||
.keepAlive,
|
||||
SearchVideoResultPage(
|
||||
key: ValueKey("6$keywords"),
|
||||
keywords: keywords,
|
||||
type: MediaStyle.Pic)
|
||||
.keepAlive,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -2,14 +2,14 @@ import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/hj_model/video_model.dart';
|
||||
import 'package:hgmj/hj_page/drama/drama_tag_detail_page.dart';
|
||||
import 'package:hgmj/hj_utils/api_service/drama_service.dart';
|
||||
import 'package:hgmj/hj_utils/api_service/search_service.dart';
|
||||
import 'package:hgmj/hj_utils/const.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/tools_base/debug_log.dart';
|
||||
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:wydj/hj_model/video_model.dart';
|
||||
import 'package:wydj/hj_page/drama/drama_tag_detail_page.dart';
|
||||
import 'package:wydj/hj_utils/api_service/drama_service.dart';
|
||||
import 'package:wydj/hj_utils/api_service/search_service.dart';
|
||||
import 'package:wydj/hj_utils/const.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/tools_base/debug_log.dart';
|
||||
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../../../hj_model/home/video_list_model.dart';
|
||||
@@ -73,18 +73,26 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
pageNumber = page;
|
||||
if (page == 1) {
|
||||
videoList = [];
|
||||
tagVidList = retResp?.tagMediaList.map((e) => e.toVideoModel(null)).toList() ?? [];
|
||||
tagVidList =
|
||||
retResp?.tagMediaList.map((e) => e.toVideoModel(null)).toList() ??
|
||||
[];
|
||||
tagID = retResp?.tagID;
|
||||
}
|
||||
videoList ??= [];
|
||||
videoList?.addAll(retResp?.list.map((e) => e.toVideoModel(null)) ?? []);
|
||||
retResp?.hasNext != true ? refreshController?.loadNoData() : refreshController?.loadComplete();
|
||||
retResp?.hasNext != true
|
||||
? refreshController?.loadNoData()
|
||||
: refreshController?.loadComplete();
|
||||
} else {
|
||||
VideoListResp? retResp = await SearchService.searchMedia(widget.keywords,
|
||||
pageNumber: page, pageSize: size, realm: widget.type.searchRealm, sortType: sortValue);
|
||||
VideoListResp? retResp = await SearchService.searchMedia(
|
||||
widget.keywords,
|
||||
pageNumber: page,
|
||||
pageSize: size,
|
||||
realm: widget.type.searchRealm,
|
||||
sortType: sortValue);
|
||||
pageNumber = page;
|
||||
videoList ??= [];
|
||||
if(page == 1) {
|
||||
if (page == 1) {
|
||||
videoList?.clear();
|
||||
}
|
||||
videoList?.addAll(retResp?.videos ?? []);
|
||||
@@ -92,7 +100,9 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
tagVidList = retResp?.tagVidList ?? [];
|
||||
tagID = retResp?.tagID;
|
||||
}
|
||||
retResp?.hasNext == false ? refreshController?.loadNoData() : refreshController?.loadComplete();
|
||||
retResp?.hasNext == false
|
||||
? refreshController?.loadNoData()
|
||||
: refreshController?.loadComplete();
|
||||
}
|
||||
} catch (e) {
|
||||
refreshController?.loadComplete();
|
||||
@@ -128,7 +138,8 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
},
|
||||
body: Column(
|
||||
children: [
|
||||
if (widget.type == MediaStyle.Video || widget.type == MediaStyle.ShortVideo)
|
||||
if (widget.type == MediaStyle.Video ||
|
||||
widget.type == MediaStyle.ShortVideo)
|
||||
DividerTabBar(
|
||||
_sortTabs.map((e) => e.name).toList(),
|
||||
selectIndex: sortIndex,
|
||||
@@ -187,7 +198,8 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
},
|
||||
);
|
||||
}
|
||||
if (widget.type == MediaStyle.Video || widget.type == MediaStyle.ShortVideo) {
|
||||
if (widget.type == MediaStyle.Video ||
|
||||
widget.type == MediaStyle.ShortVideo) {
|
||||
bool isShort = widget.type == MediaStyle.ShortVideo;
|
||||
return GridView.builder(
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
@@ -267,7 +279,8 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
if (tagID?.isNotEmpty == true) ...[
|
||||
const SizedBox(height: 12),
|
||||
GestureDetector(
|
||||
onTap: () => DramaTagDetailPage.to(TagsBean(id: tagID, name: widget.keywords)),
|
||||
onTap: () => DramaTagDetailPage.to(
|
||||
TagsBean(id: tagID, name: widget.keywords)),
|
||||
child: Container(
|
||||
height: 40,
|
||||
alignment: Alignment.center,
|
||||
@@ -278,9 +291,12 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('查看更多', style: TextStyle(color: Color(0xffFFFFFF), fontSize: 14)),
|
||||
Text('查看更多',
|
||||
style: TextStyle(
|
||||
color: Color(0xffFFFFFF), fontSize: 14)),
|
||||
SizedBox(width: 6),
|
||||
Icon(Icons.keyboard_arrow_right, color: Color(0xffFFFFFF), size: 18),
|
||||
Icon(Icons.keyboard_arrow_right,
|
||||
color: Color(0xffFFFFFF), size: 18),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -291,7 +307,8 @@ class _SearchVideoResultPageState extends State<SearchVideoResultPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
if (widget.type == MediaStyle.Video || widget.type == MediaStyle.ShortVideo) {
|
||||
if (widget.type == MediaStyle.Video ||
|
||||
widget.type == MediaStyle.ShortVideo) {
|
||||
bool isShort = widget.type == MediaStyle.ShortVideo;
|
||||
return Container(
|
||||
padding: EdgeInsets.fromLTRB(12, 12, 12, 0),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/app_colors.dart';
|
||||
import 'package:hgmj/hj_model/cartoon_media_info.dart';
|
||||
import 'package:wydj/assets_tool/app_colors.dart';
|
||||
import 'package:wydj/hj_model/cartoon_media_info.dart';
|
||||
import 'package:waterfall_flow/waterfall_flow.dart';
|
||||
|
||||
import '../../../hj_model/home/video_library_model.dart';
|
||||
@@ -73,8 +73,12 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildItemMenuWidget("分类", logic.homeVideoLibrary?.canvas, logic.firstSelectedType, (data) {
|
||||
if (logic.firstSelectedType?.isACG != data.isACG) {
|
||||
_buildItemMenuWidget(
|
||||
"分类",
|
||||
logic.homeVideoLibrary?.canvas,
|
||||
logic.firstSelectedType, (data) {
|
||||
if (logic.firstSelectedType?.isACG !=
|
||||
data.isACG) {
|
||||
logic.thirdSelectedType = null;
|
||||
}
|
||||
if (logic.firstSelectedType != data) {
|
||||
@@ -85,7 +89,10 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
logic.searchVideoList?.clear();
|
||||
logic.menuExchangeEvent();
|
||||
}),
|
||||
_buildItemMenuWidget("排序", logic.homeVideoLibrary?.orderBy, logic.secondSelectedType, (data) {
|
||||
_buildItemMenuWidget(
|
||||
"排序",
|
||||
logic.homeVideoLibrary?.orderBy,
|
||||
logic.secondSelectedType, (data) {
|
||||
if (logic.secondSelectedType != data) {
|
||||
logic.secondSelectedType = data;
|
||||
} else {
|
||||
@@ -93,7 +100,9 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
}
|
||||
logic.menuExchangeEvent();
|
||||
}),
|
||||
_buildTagMenuWidget("标签", logic.tags, logic.thirdSelectedType, (data) {
|
||||
_buildTagMenuWidget(
|
||||
"标签", logic.tags, logic.thirdSelectedType,
|
||||
(data) {
|
||||
if (logic.thirdSelectedType != data) {
|
||||
logic.thirdSelectedType = data;
|
||||
} else {
|
||||
@@ -101,7 +110,10 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
}
|
||||
logic.menuExchangeEvent();
|
||||
}),
|
||||
_buildItemMenuWidget("时间", logic.homeVideoLibrary?.timeType, logic.fivthSelectedType, (data) {
|
||||
_buildItemMenuWidget(
|
||||
"时间",
|
||||
logic.homeVideoLibrary?.timeType,
|
||||
logic.fivthSelectedType, (data) {
|
||||
if (logic.fivthSelectedType != data) {
|
||||
logic.fivthSelectedType = data;
|
||||
} else {
|
||||
@@ -208,7 +220,8 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
child: LoadingCenterWidget(),
|
||||
),
|
||||
);
|
||||
} else if (logic.searchVideoList?.isNotEmpty != true && logic.searchACGList?.isNotEmpty != true) {
|
||||
} else if (logic.searchVideoList?.isNotEmpty != true &&
|
||||
logic.searchACGList?.isNotEmpty != true) {
|
||||
return SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
height: 300,
|
||||
@@ -235,10 +248,14 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
);
|
||||
}
|
||||
if (typeName == "图集") {
|
||||
return _buildWaterfall(logic, (vm) => PhotoGalleryItem(videoModel: vm, textline: 1));
|
||||
return _buildWaterfall(
|
||||
logic, (vm) => PhotoGalleryItem(videoModel: vm, textline: 1));
|
||||
}
|
||||
if (typeName == "抖音" || logic.firstSelectedType?.key == "sp") {
|
||||
return _buildWaterfall(logic, (vm) => VideoSimpleCell(videoModel: vm, textLines: 1, isShort: true));
|
||||
return _buildWaterfall(
|
||||
logic,
|
||||
(vm) =>
|
||||
VideoSimpleCell(videoModel: vm, textLines: 1, isShort: true));
|
||||
} else if (typeName == "动漫" || typeName == "漫画") {
|
||||
bool isCartoon = typeName == "动漫";
|
||||
return SliverPadding(
|
||||
@@ -285,7 +302,8 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
}
|
||||
|
||||
//图集/抖音共用的 3 列瀑布流(仅 item 构建不同)
|
||||
Widget _buildWaterfall(VideoAllTypeLogic logic, Widget Function(VideoModel vm) itemBuilder) {
|
||||
Widget _buildWaterfall(
|
||||
VideoAllTypeLogic logic, Widget Function(VideoModel vm) itemBuilder) {
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.fromLTRB(12, 12, 12, 0),
|
||||
sliver: SliverWaterfallFlow(
|
||||
@@ -305,7 +323,8 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildItemMenuWidget(String typeName, List<TimeType>? listData, TimeType? selectType, Function(TimeType timeType) callBack) {
|
||||
Widget _buildItemMenuWidget(String typeName, List<TimeType>? listData,
|
||||
TimeType? selectType, Function(TimeType timeType) callBack) {
|
||||
selectType ??= listData?[0];
|
||||
return Container(
|
||||
height: 40,
|
||||
@@ -322,7 +341,8 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
itemBuilder: (context, index) {
|
||||
TimeType data = listData![index];
|
||||
bool isSelected = selectType?.name == data.name;
|
||||
return InkWell(enableFeedback: false,
|
||||
return InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () async {
|
||||
callBack.call(data);
|
||||
},
|
||||
@@ -336,7 +356,8 @@ class _VideoAllTypePageState extends State<VideoAllTypePage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTagMenuWidget(String typeName, List<Tags>? listData, Tags? selectType, Function(Tags timeType) callBack) {
|
||||
Widget _buildTagMenuWidget(String typeName, List<Tags>? listData,
|
||||
Tags? selectType, Function(Tags timeType) callBack) {
|
||||
selectType ??= listData?[0];
|
||||
return Container(
|
||||
height: 40,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/images.dart';
|
||||
import 'package:hgmj/config/config.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:wydj/assets_tool/images.dart';
|
||||
import 'package:wydj/config/config.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
|
||||
import '../../../../tools_base/widget/marquee_widget.dart';
|
||||
import '../../../../tools_base/widget/net_image_widget.dart';
|
||||
@@ -69,7 +69,7 @@ class _CommonSearchBarViewState extends State<CommonSearchBarView> {
|
||||
child: Image.asset('nav_logo.webp'.homePath, width: 28, height: 28),
|
||||
),
|
||||
6.sizeBoxW,
|
||||
const Text('黄果漫剧', style: _titleStyle),
|
||||
const Text('51短剧', style: _titleStyle),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -89,18 +89,22 @@ class _CommonSearchBarViewState extends State<CommonSearchBarView> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset('search_icon.png'.commonImgPath, width: 18, height: 18, color: Colors.white),
|
||||
Image.asset('search_icon.png'.commonImgPath,
|
||||
width: 18, height: 18, color: Colors.white),
|
||||
8.sizeBoxW,
|
||||
Expanded(
|
||||
child: Config.searchHints.isEmpty
|
||||
? Text('请输入关键字', style: _hintStyle)
|
||||
: MarqueeWidget(
|
||||
count: Config.searchHints.length,
|
||||
onIndexChanged: (index) => _searchText = Config.searchHints[index],
|
||||
onIndexChanged: (index) =>
|
||||
_searchText = Config.searchHints[index],
|
||||
itemBuilder: (_, index) => Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(Config.searchHints[index],
|
||||
style: _hintStyle, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
style: _hintStyle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/images.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/tools_base/toast.dart';
|
||||
import 'package:wydj/assets_tool/images.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/tools_base/toast.dart';
|
||||
|
||||
import '../video_all_type_page.dart';
|
||||
|
||||
@@ -76,7 +76,9 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
height: 32,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
alignment: Alignment.centerLeft,
|
||||
decoration: BoxDecoration(color: Color(0x11FFFFFF), borderRadius: BorderRadius.circular(20)),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0x11FFFFFF),
|
||||
borderRadius: BorderRadius.circular(20)),
|
||||
child: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
@@ -87,7 +89,8 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
child: Row(
|
||||
children: [
|
||||
2.sizeBoxW,
|
||||
Image.asset('libary_search.webp'.homePath, width: 20, color: Color(0xFFFFC000)),
|
||||
Image.asset('libary_search.webp'.homePath,
|
||||
width: 20, color: Color(0xFFFFC000)),
|
||||
6.sizeBoxW,
|
||||
Text(
|
||||
'片库',
|
||||
@@ -109,7 +112,10 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: searchTextCtr,
|
||||
style: TextStyle(color: Colors.white.withValues(alpha: .8), fontSize: 14, height: 1),
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: .8),
|
||||
fontSize: 14,
|
||||
height: 1),
|
||||
onSubmitted: (value) => widget.onSubmitted(value),
|
||||
onChanged: (value) {
|
||||
if (value.isNotEmpty == true) {
|
||||
@@ -125,7 +131,10 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
textInputAction: TextInputAction.search,
|
||||
decoration: InputDecoration(
|
||||
hintText: '搜索关键词',
|
||||
hintStyle: TextStyle(color: Colors.white.withValues(alpha: .55), fontSize: 14, height: 1),
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withValues(alpha: .55),
|
||||
fontSize: 14,
|
||||
height: 1),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
@@ -142,7 +151,8 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
showDeleteIcon = false;
|
||||
});
|
||||
},
|
||||
child: Image.asset('search_close.webp'.homePath, width: 18),
|
||||
child: Image.asset('search_close.webp'.homePath,
|
||||
width: 18),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hgmj/assets_tool/images.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:wydj/assets_tool/images.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
|
||||
/// 搜索历史区:纯展示,数据与增删由 SearchMainLogic 持有
|
||||
class SearchHistoryView extends StatefulWidget {
|
||||
@@ -57,7 +57,8 @@ class _SearchHistoryViewState extends State<SearchHistoryView> {
|
||||
onTap: widget.onClearAll,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(1),
|
||||
child: Image.asset("history_delete.webp".homePath, width: 18, height: 18),
|
||||
child: Image.asset("history_delete.webp".homePath,
|
||||
width: 18, height: 18),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -74,7 +75,8 @@ class _SearchHistoryViewState extends State<SearchHistoryView> {
|
||||
mainAxisSpacing: 12,
|
||||
crossAxisSpacing: 12,
|
||||
),
|
||||
itemBuilder: (_, index) => _buildHistoryItem(widget.histories[index]),
|
||||
itemBuilder: (_, index) =>
|
||||
_buildHistoryItem(widget.histories[index]),
|
||||
),
|
||||
_buildMoreRecord(),
|
||||
],
|
||||
@@ -108,7 +110,8 @@ class _SearchHistoryViewState extends State<SearchHistoryView> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
alignment: Alignment.topCenter,
|
||||
child: InkWell(enableFeedback: false,
|
||||
child: InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () => setState(() => isExpandData = !isExpandData),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hgmj/config/config.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
|
||||
import 'package:wydj/config/config.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
|
||||
class SearchHotTagView extends StatelessWidget {
|
||||
final Function(String keyword) onTagClick;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/app_colors.dart';
|
||||
import 'package:hgmj/hj_model/video_model.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
|
||||
import 'package:wydj/assets_tool/app_colors.dart';
|
||||
import 'package:wydj/hj_model/video_model.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/tools_base/widget/net_image_widget.dart';
|
||||
|
||||
import '../../../community/community_tag_page/community_tag_page.dart';
|
||||
import 'package:hgmj/extension/extensions.dart';
|
||||
import 'package:wydj/extension/extensions.dart';
|
||||
|
||||
class TopicItem extends StatelessWidget {
|
||||
final TagsBean model;
|
||||
final bool isSelect;
|
||||
final Function()? onTap;
|
||||
|
||||
const TopicItem({super.key, required this.model, this.onTap, this.isSelect = false});
|
||||
const TopicItem(
|
||||
{super.key, required this.model, this.onTap, this.isSelect = false});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -50,7 +51,10 @@ class TopicItem extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'#${model.name}',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user