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