Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-29 20:13:11 +08:00
parent 924d51d41b
commit 8aeb035e55
13 changed files with 220 additions and 244 deletions

View File

@@ -179,7 +179,6 @@ class _ArticlePageState extends State<ArticlePage>
VoidCallback? onDispose,
}) =>
Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
titleSpacing: automaticallyImplyLeading ? null : 12,

View File

@@ -130,7 +130,6 @@ class _DynamicsPageState extends State<DynamicsPage>
super.build(context);
ThemeData theme = Theme.of(context);
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
leading: upPanelPosition == UpPanelPosition.rightDrawer
? _createDynamicBtn(theme, false)

View File

@@ -57,152 +57,146 @@ class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
return Scaffold(
backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: false,
appBar: _buildAppBar(theme),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: ListView(
padding: EdgeInsets.zero,
controller: widget.scrollController,
physics: const ClampingScrollPhysics(),
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Obx(
() {
final hasTopic = topic.value != null;
return Row(
spacing: 10,
children: [
TextButton(
style: TextButton.styleFrom(
overlayColor:
hasTopic ? Colors.transparent : null,
splashFactory:
hasTopic ? NoSplash.splashFactory : null,
shape: hasTopic
? null
: RoundedRectangleBorder(
side: BorderSide(
color: hasTopic
? Colors.transparent
: theme.colorScheme.outline
.withValues(alpha: 0.2),
),
borderRadius: const BorderRadius.all(
Radius.circular(25),
),
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildAppBar(theme),
Expanded(
child: ListView(
padding: EdgeInsets.zero,
controller: widget.scrollController,
physics: const ClampingScrollPhysics(),
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Obx(
() {
final hasTopic = topic.value != null;
return Row(
spacing: 10,
children: [
TextButton(
style: TextButton.styleFrom(
overlayColor: hasTopic ? Colors.transparent : null,
splashFactory:
hasTopic ? NoSplash.splashFactory : null,
shape: hasTopic
? null
: RoundedRectangleBorder(
side: BorderSide(
color: hasTopic
? Colors.transparent
: theme.colorScheme.outline
.withValues(alpha: 0.2),
),
minimumSize: Size.zero,
padding: hasTopic
? const EdgeInsets.symmetric(vertical: 12)
: const EdgeInsets.all(12),
visualDensity: VisualDensity.compact,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
onPressed: _onSelectTopic,
child: Text.rich(
TextSpan(
children: [
WidgetSpan(
child: Padding(
padding: const EdgeInsets.only(right: 5),
child: Icon(
CustomIcon.topic_tag,
size: 18,
color: hasTopic
? null
: theme.colorScheme.outline,
),
borderRadius: const BorderRadius.all(
Radius.circular(25),
),
),
TextSpan(
text:
hasTopic ? topic.value!.second : '选择话题',
style: TextStyle(
minimumSize: Size.zero,
padding: hasTopic
? const EdgeInsets.symmetric(vertical: 12)
: const EdgeInsets.all(12),
visualDensity: VisualDensity.compact,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
onPressed: _onSelectTopic,
child: Text.rich(
TextSpan(
children: [
WidgetSpan(
child: Padding(
padding: const EdgeInsets.only(right: 5),
child: Icon(
CustomIcon.topic_tag,
size: 18,
color: hasTopic
? null
: theme.colorScheme.outline,
),
),
],
),
),
TextSpan(
text: hasTopic ? topic.value!.second : '选择话题',
style: TextStyle(
color: hasTopic
? null
: theme.colorScheme.outline,
),
),
],
),
),
if (hasTopic)
iconButton(
size: 22,
iconSize: 16,
context: context,
icon: Icons.clear,
bgColor: theme.colorScheme.onInverseSurface,
iconColor: theme.colorScheme.onSurfaceVariant,
onPressed: () => topic.value = null,
),
],
);
},
),
),
if (hasTopic)
iconButton(
size: 22,
iconSize: 16,
context: context,
icon: Icons.clear,
bgColor: theme.colorScheme.onInverseSurface,
iconColor: theme.colorScheme.onSurfaceVariant,
onPressed: () => topic.value = null,
),
],
);
},
),
const SizedBox(height: 5),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextField(
controller: _titleEditCtr,
style: const TextStyle(fontWeight: FontWeight.bold),
decoration: InputDecoration(
hintText: '标题选填20字',
isDense: true,
contentPadding: EdgeInsets.zero,
border: const OutlineInputBorder(
gapPadding: 0,
borderSide: BorderSide.none,
),
hintStyle: TextStyle(
fontWeight: FontWeight.bold,
color: theme.colorScheme.outline.withValues(alpha: 0.7),
),
),
const SizedBox(height: 5),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextField(
controller: _titleEditCtr,
style: const TextStyle(fontWeight: FontWeight.bold),
decoration: InputDecoration(
hintText: '标题选填20字',
isDense: true,
contentPadding: EdgeInsets.zero,
border: const OutlineInputBorder(
gapPadding: 0,
borderSide: BorderSide.none,
),
hintStyle: TextStyle(
fontWeight: FontWeight.bold,
color: theme.colorScheme.outline.withValues(alpha: 0.7),
),
inputFormatters: [LengthLimitingTextInputFormatter(20)],
),
inputFormatters: [LengthLimitingTextInputFormatter(20)],
),
const SizedBox(height: 5),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: _buildEditWidget(theme),
),
const SizedBox(height: 5),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: _buildEditWidget(theme),
),
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Obx(() => _buildPubtimeWidget),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Obx(() => _buildReplyOptionWidget(theme)),
const SizedBox(height: 5),
Obx(() => _buildPrivateWidget(theme)),
],
),
],
),
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Obx(() => _buildPubtimeWidget),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Obx(() => _buildReplyOptionWidget(theme)),
const SizedBox(height: 5),
Obx(() => _buildPrivateWidget(theme)),
],
),
],
),
),
const SizedBox(height: 10),
_buildImageList(theme),
],
),
),
const SizedBox(height: 10),
_buildImageList(theme),
],
),
_buildToolbar,
buildPanelContainer(Colors.transparent),
],
),
),
_buildToolbar,
buildPanelContainer(Colors.transparent),
],
);
}

View File

@@ -125,7 +125,6 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
VoidCallback? onDispose,
}) =>
Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
titleSpacing: automaticallyImplyLeading ? null : 12,

View File

@@ -272,71 +272,65 @@ class _LiveRoomPageState extends State<LiveRoomPage>
);
}
Widget get _buildPH => Scaffold(
resizeToAvoidBottomInset: false,
appBar: _buildAppBar,
backgroundColor: Colors.transparent,
body: Column(
children: _buildBodyP,
),
Widget get _buildPH => Column(
children: [
_buildAppBar,
..._buildBodyP,
],
);
Widget get _buildPP => Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Stack(
clipBehavior: Clip.none,
children: [
_buildAppBar,
Column(
children: [
Obx(
() => Container(
color: Colors.black,
width: Get.width,
margin: isFullScreen
? null
: EdgeInsets.only(
top: 56 + MediaQuery.paddingOf(context).top,
),
height: isFullScreen
? Get.height -
(context.orientation == Orientation.landscape
? 0
: MediaQuery.paddingOf(context).top)
: Get.height - 56 - 85 - padding!,
child: videoPlayerPanel(
alignment: isFullScreen ? null : Alignment.topCenter,
),
Widget get _buildPP => Stack(
clipBehavior: Clip.none,
children: [
_buildAppBar,
Column(
children: [
Obx(
() => Container(
color: Colors.black,
width: Get.width,
margin: isFullScreen
? null
: EdgeInsets.only(
top: 56 + MediaQuery.paddingOf(context).top,
),
height: isFullScreen
? Get.height -
(context.orientation == Orientation.landscape
? 0
: MediaQuery.paddingOf(context).top)
: Get.height - 56 - 85 - padding!,
child: videoPlayerPanel(
alignment: isFullScreen ? null : Alignment.topCenter,
),
),
],
),
Obx(
() => isFullScreen
? const SizedBox.shrink()
: Positioned(
left: 0,
right: 0,
bottom: 125 + MediaQuery.paddingOf(context).bottom,
child: SizedBox(
height: 125,
child: _buildChatWidget(true),
),
),
],
),
Obx(
() => isFullScreen
? const SizedBox.shrink()
: Positioned(
left: 0,
right: 0,
bottom: 125 + MediaQuery.paddingOf(context).bottom,
child: SizedBox(
height: 125,
child: _buildChatWidget(true),
),
),
Obx(
() => isFullScreen
? const SizedBox.shrink()
: Positioned(
left: 0,
right: 0,
bottom: 0,
child: _buildInputWidget,
),
),
],
),
),
),
Obx(
() => isFullScreen
? const SizedBox.shrink()
: Positioned(
left: 0,
right: 0,
bottom: 0,
child: _buildInputWidget,
),
),
],
);
@override

View File

@@ -202,7 +202,6 @@ class _MainAppState extends State<MainApp>
systemNavigationBarIconBrightness: theme.brightness.reverse,
),
child: Scaffold(
resizeToAvoidBottomInset: false,
extendBody: true,
body: Row(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -29,7 +29,6 @@ class _SearchPageState extends State<SearchPage> {
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
resizeToAvoidBottomInset: true,
appBar: AppBar(
shape: Border(
bottom: BorderSide(

View File

@@ -357,13 +357,9 @@ class VideoDetailController extends GetxController
}
} catch (_) {}
} else if (isLoadPrevious) {
if (data.mediaList?.isNotEmpty == true) {
mediaList.insertAll(0, data.mediaList!);
}
mediaList.insertAll(0, data.mediaList!);
} else {
if (data.mediaList?.isNotEmpty == true) {
mediaList.addAll(data.mediaList!);
}
mediaList.addAll(data.mediaList!);
}
}
} else {
@@ -1477,7 +1473,7 @@ class VideoDetailController extends GetxController
} catch (_) {}
}
if (GStorage.showViewPoints && playInfo.viewPoints?.isNotEmpty == true) {
if (playInfo.viewPoints?.isNotEmpty == true && GStorage.showViewPoints) {
try {
viewPointList = playInfo.viewPoints!.map((item) {
double start =

View File

@@ -416,13 +416,14 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
return Row(
spacing: 6,
children: [
Text(
(bangumiItem.areas!.isNotEmpty ? bangumiItem.areas!.first.name! : ''),
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
if (bangumiItem.areas?.isNotEmpty == true)
Text(
bangumiItem.areas!.first.name!,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
),
),
),
Text(
bangumiItem.publish!.pubTimeShow!,
style: TextStyle(

View File

@@ -259,7 +259,7 @@ class _MediaListPanelState
],
),
),
if (showDelBtn && isCurr)
if (showDelBtn && !isCurr)
Positioned(
right: 12,
bottom: -6,

View File

@@ -54,37 +54,39 @@ class _NoteListPageState extends CommonSlidePageState<NoteListPage> {
Widget buildPage(ThemeData theme) {
return Scaffold(
key: _key,
resizeToAvoidBottomInset: false,
body: Scaffold(
backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: false,
appBar: AppBar(
automaticallyImplyLeading: false,
titleSpacing: 16,
toolbarHeight: 45,
title: Obx(
() => Text(
'笔记${_controller.count.value == -1 ? '' : '(${_controller.count.value})'}'),
),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Divider(
height: 1,
color: theme.colorScheme.outline.withValues(alpha: 0.1),
body: Column(
children: [
SizedBox(
height: 45,
child: AppBar(
automaticallyImplyLeading: false,
titleSpacing: 16,
toolbarHeight: 45,
title: Obx(
() => Text(
'笔记${_controller.count.value == -1 ? '' : '(${_controller.count.value})'}'),
),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Divider(
height: 1,
color: theme.colorScheme.outline.withValues(alpha: 0.1),
),
),
actions: [
iconButton(
context: context,
tooltip: '关闭',
icon: Icons.clear,
onPressed: Get.back,
size: 32,
),
const SizedBox(width: 16),
],
),
),
actions: [
iconButton(
context: context,
tooltip: '关闭',
icon: Icons.clear,
onPressed: Get.back,
size: 32,
),
const SizedBox(width: 16),
],
),
body: enableSlide ? slideList(theme) : buildList(theme),
Expanded(child: enableSlide ? slideList(theme) : buildList(theme))
],
),
);
}

View File

@@ -35,7 +35,6 @@ class _ViewPointsPageState
@override
Widget buildPage(ThemeData theme) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
automaticallyImplyLeading: false,
titleSpacing: 16,

View File

@@ -119,7 +119,6 @@ class PiliScheme {
'id': commentSecondaryId,
},
() => Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
actions: [
@@ -257,7 +256,6 @@ class PiliScheme {
'enterUri': queryParameters['enterUri'],
},
() => Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
actions: [
@@ -306,7 +304,6 @@ class PiliScheme {
'type': type,
},
() => Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
actions: [
@@ -381,7 +378,6 @@ class PiliScheme {
'id': commentSecondaryId,
},
() => Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
actions: [
@@ -767,7 +763,6 @@ class PiliScheme {
'id': commentSecondaryId,
},
() => Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('评论详情'),
actions: pageType == '1'