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, VoidCallback? onDispose,
}) => }) =>
Scaffold( Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar( appBar: AppBar(
title: const Text('评论详情'), title: const Text('评论详情'),
titleSpacing: automaticallyImplyLeading ? null : 12, titleSpacing: automaticallyImplyLeading ? null : 12,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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