mod: custom version 2
This commit is contained in:
@ -51,36 +51,36 @@ class _HomePageState extends State<HomePage>
|
||||
callback: showUserBottonSheet,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 42,
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: TabBar(
|
||||
controller: _homeController.tabController,
|
||||
tabs: [
|
||||
for (var i in _homeController.tabs) Tab(text: i['label'])
|
||||
],
|
||||
isScrollable: true,
|
||||
dividerColor: Colors.transparent,
|
||||
enableFeedback: true,
|
||||
splashBorderRadius: BorderRadius.circular(10),
|
||||
onTap: (value) {
|
||||
feedBack();
|
||||
if (_homeController.initialIndex == value) {
|
||||
_homeController.tabsCtrList[value]().animateToTop();
|
||||
}
|
||||
_homeController.initialIndex = value;
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _homeController.tabController,
|
||||
children: _homeController.tabsPageList,
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: double.infinity,
|
||||
// height: 42,
|
||||
// child: Align(
|
||||
// alignment: Alignment.center,
|
||||
// child: TabBar(
|
||||
// controller: _homeController.tabController,
|
||||
// tabs: [
|
||||
// for (var i in _homeController.tabs) Tab(text: i['label'])
|
||||
// ],
|
||||
// isScrollable: true,
|
||||
// dividerColor: Colors.transparent,
|
||||
// enableFeedback: true,
|
||||
// splashBorderRadius: BorderRadius.circular(10),
|
||||
// onTap: (value) {
|
||||
// feedBack();
|
||||
// if (_homeController.initialIndex == value) {
|
||||
// _homeController.tabsCtrList[value]().animateToTop();
|
||||
// }
|
||||
// _homeController.initialIndex = value;
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: TabBarView(
|
||||
// controller: _homeController.tabController,
|
||||
// children: _homeController.tabsPageList,
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -4,7 +4,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:pilipala/pages/dynamics/index.dart';
|
||||
// import 'package:pilipala/pages/dynamics/index.dart';
|
||||
import 'package:pilipala/pages/home/view.dart';
|
||||
import 'package:pilipala/pages/media/index.dart';
|
||||
import 'package:pilipala/utils/storage.dart';
|
||||
@ -13,7 +13,7 @@ import 'package:pilipala/utils/utils.dart';
|
||||
class MainController extends GetxController {
|
||||
List<Widget> pages = <Widget>[
|
||||
const HomePage(),
|
||||
const DynamicsPage(),
|
||||
// const DynamicsPage(),
|
||||
const MediaPage(),
|
||||
];
|
||||
RxList navigationBars = [
|
||||
@ -28,17 +28,17 @@ class MainController extends GetxController {
|
||||
),
|
||||
'label': "首页",
|
||||
},
|
||||
{
|
||||
'icon': const Icon(
|
||||
Icons.motion_photos_on_outlined,
|
||||
size: 21,
|
||||
),
|
||||
'selectIcon': const Icon(
|
||||
Icons.motion_photos_on,
|
||||
size: 21,
|
||||
),
|
||||
'label': "动态",
|
||||
},
|
||||
// {
|
||||
// 'icon': const Icon(
|
||||
// Icons.motion_photos_on_outlined,
|
||||
// size: 21,
|
||||
// ),
|
||||
// 'selectIcon': const Icon(
|
||||
// Icons.motion_photos_on,
|
||||
// size: 21,
|
||||
// ),
|
||||
// 'label': "动态",
|
||||
// },
|
||||
{
|
||||
'icon': const Icon(
|
||||
Icons.folder_outlined,
|
||||
|
@ -308,28 +308,29 @@ class _MemberPageState extends State<MemberPage>
|
||||
return MediaQuery.of(context).padding.top + kToolbarHeight;
|
||||
},
|
||||
onlyOneScrollInBody: true,
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
child: TabBar(controller: _tabController, tabs: const [
|
||||
Tab(text: '主页'),
|
||||
Tab(text: '动态'),
|
||||
Tab(text: '投稿'),
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: const [
|
||||
Text('主页'),
|
||||
MemberDynamicPanel(),
|
||||
ArchivePanel(),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
// body: Column(
|
||||
// children: [
|
||||
// SizedBox(
|
||||
// width: double.infinity,
|
||||
// height: 50,
|
||||
// child: TabBar(controller: _tabController, tabs: const [
|
||||
// Tab(text: '主页'),
|
||||
// Tab(text: '动态'),
|
||||
// Tab(text: '投稿'),
|
||||
// ]),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: TabBarView(
|
||||
// controller: _tabController,
|
||||
// children: const [
|
||||
// Text('主页'),
|
||||
// MemberDynamicPanel(),
|
||||
// ArchivePanel(),
|
||||
// ],
|
||||
// ))
|
||||
// ],
|
||||
// ),
|
||||
body: ArchivePanel(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class SSearchController extends GetxController {
|
||||
searchSuggestList.value = [];
|
||||
return;
|
||||
}
|
||||
_debouncer.call(() => querySearchSuggest(value));
|
||||
// _debouncer.call(() => querySearchSuggest(value));
|
||||
}
|
||||
|
||||
void onClear() {
|
||||
|
@ -144,7 +144,7 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
children: [
|
||||
const SizedBox(height: 12),
|
||||
// 搜索建议
|
||||
_searchSuggest(),
|
||||
// _searchSuggest(),
|
||||
// 热搜
|
||||
Visibility(
|
||||
visible: _searchController.enableHotKey,
|
||||
|
@ -276,63 +276,63 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () => showIntroDetail(),
|
||||
child: Row(
|
||||
children: [
|
||||
StatView(
|
||||
theme: 'gray',
|
||||
view: !widget.loadingStatus
|
||||
? widget.videoDetail!.stat!.view
|
||||
: videoItem['stat'].view,
|
||||
size: 'medium',
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
StatDanMu(
|
||||
theme: 'gray',
|
||||
danmu: !widget.loadingStatus
|
||||
? widget.videoDetail!.stat!.danmaku
|
||||
: videoItem['stat'].danmaku,
|
||||
size: 'medium',
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
Utils.dateFormat(
|
||||
!widget.loadingStatus
|
||||
? widget.videoDetail!.pubdate
|
||||
: videoItem['pubdate'],
|
||||
formatType: 'detail'),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: t.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
if (videoIntroController.isShowOnlineTotal)
|
||||
Obx(
|
||||
() => Text(
|
||||
'${videoIntroController.total.value}人在看',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: t.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 7),
|
||||
// GestureDetector(
|
||||
// behavior: HitTestBehavior.translucent,
|
||||
// onTap: () => showIntroDetail(),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// StatView(
|
||||
// theme: 'gray',
|
||||
// view: !widget.loadingStatus
|
||||
// ? widget.videoDetail!.stat!.view
|
||||
// : videoItem['stat'].view,
|
||||
// size: 'medium',
|
||||
// ),
|
||||
// const SizedBox(width: 10),
|
||||
// StatDanMu(
|
||||
// theme: 'gray',
|
||||
// danmu: !widget.loadingStatus
|
||||
// ? widget.videoDetail!.stat!.danmaku
|
||||
// : videoItem['stat'].danmaku,
|
||||
// size: 'medium',
|
||||
// ),
|
||||
// const SizedBox(width: 10),
|
||||
// Text(
|
||||
// Utils.dateFormat(
|
||||
// !widget.loadingStatus
|
||||
// ? widget.videoDetail!.pubdate
|
||||
// : videoItem['pubdate'],
|
||||
// formatType: 'detail'),
|
||||
// style: TextStyle(
|
||||
// fontSize: 12,
|
||||
// color: t.colorScheme.outline,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(width: 10),
|
||||
// if (videoIntroController.isShowOnlineTotal)
|
||||
// Obx(
|
||||
// () => Text(
|
||||
// '${videoIntroController.total.value}人在看',
|
||||
// style: TextStyle(
|
||||
// fontSize: 12,
|
||||
// color: t.colorScheme.outline,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 7),
|
||||
// 点赞收藏转发 布局样式1
|
||||
SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(top: 7, bottom: 7),
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: actionRow(
|
||||
context,
|
||||
videoIntroController,
|
||||
videoDetailCtr,
|
||||
),
|
||||
),
|
||||
// SingleChildScrollView(
|
||||
// padding: const EdgeInsets.only(top: 7, bottom: 7),
|
||||
// scrollDirection: Axis.horizontal,
|
||||
// child: actionRow(
|
||||
// context,
|
||||
// videoIntroController,
|
||||
// videoDetailCtr,
|
||||
// ),
|
||||
// ),
|
||||
// 点赞收藏转发 布局样式2
|
||||
// actionGrid(context, videoIntroController),
|
||||
// 合集
|
||||
|
@ -407,7 +407,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
.withOpacity(0.06),
|
||||
),
|
||||
),
|
||||
const RelatedVideoPanel(),
|
||||
// const RelatedVideoPanel(),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
Reference in New Issue
Block a user