mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 16:48:43 +00:00
@@ -200,55 +200,15 @@ class _AudioPageState extends State<AudioPage> {
|
||||
builder: (context) {
|
||||
final theme = Theme.of(context);
|
||||
final colorScheme = theme.colorScheme;
|
||||
return FractionallySizedBox(
|
||||
heightFactor:
|
||||
PlatformUtils.isMobile && !context.mediaQuerySize.isPortrait
|
||||
? 1.0
|
||||
: 0.7,
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: Get.back,
|
||||
borderRadius: StyleString.bottomSheetRadius,
|
||||
child: SizedBox(
|
||||
height: 35,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.outline,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(3),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: Theme(
|
||||
data: theme.copyWith(
|
||||
dividerColor: Colors.transparent,
|
||||
),
|
||||
child: refreshIndicator(
|
||||
onRefresh: () => _controller.loadPrev(context),
|
||||
isClampingScrollPhysics: true,
|
||||
child: CustomScrollView(
|
||||
Widget child = CustomScrollView(
|
||||
controller: scrollController,
|
||||
physics: _controller.reachStart
|
||||
? const ClampingScrollPhysics()
|
||||
: const AlwaysScrollableScrollPhysics(
|
||||
parent: ClampingScrollPhysics(),
|
||||
),
|
||||
? null
|
||||
: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom:
|
||||
MediaQuery.paddingOf(context).bottom + 100,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 100,
|
||||
),
|
||||
sliver: SliverList.builder(
|
||||
itemCount: playlist.length,
|
||||
@@ -264,14 +224,9 @@ class _AudioPageState extends State<AudioPage> {
|
||||
dense: true,
|
||||
minTileHeight: 45,
|
||||
initiallyExpanded: isCurr,
|
||||
collapsedIconColor: isCurr
|
||||
? colorScheme.primary
|
||||
: null,
|
||||
iconColor: isCurr
|
||||
? null
|
||||
: colorScheme.onSurfaceVariant,
|
||||
controlAffinity:
|
||||
ListTileControlAffinity.leading,
|
||||
collapsedIconColor: isCurr ? colorScheme.primary : null,
|
||||
iconColor: isCurr ? null : colorScheme.onSurfaceVariant,
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
title: Text(
|
||||
item.arc.title,
|
||||
maxLines: 1,
|
||||
@@ -289,13 +244,11 @@ class _AudioPageState extends State<AudioPage> {
|
||||
: iconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
onPressed: () {
|
||||
if (index <
|
||||
_controller.index!) {
|
||||
if (index < _controller.index!) {
|
||||
_controller.index -= 1;
|
||||
}
|
||||
playlist.removeAt(index);
|
||||
(context as Element)
|
||||
.markNeedsBuild();
|
||||
(context as Element).markNeedsBuild();
|
||||
},
|
||||
iconColor: colorScheme.outline,
|
||||
size: 28,
|
||||
@@ -306,8 +259,7 @@ class _AudioPageState extends State<AudioPage> {
|
||||
return ListTile(
|
||||
dense: true,
|
||||
minTileHeight: 45,
|
||||
contentPadding:
|
||||
const EdgeInsetsDirectional.only(
|
||||
contentPadding: const EdgeInsetsDirectional.only(
|
||||
start: 56.0,
|
||||
end: 24.0,
|
||||
),
|
||||
@@ -331,8 +283,7 @@ class _AudioPageState extends State<AudioPage> {
|
||||
)
|
||||
: TextStyle(
|
||||
fontSize: 14,
|
||||
color: colorScheme
|
||||
.onSurfaceVariant,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
TextSpan(
|
||||
children: [
|
||||
@@ -346,8 +297,7 @@ class _AudioPageState extends State<AudioPage> {
|
||||
cacheWidth: 16.cacheSize(
|
||||
context,
|
||||
),
|
||||
color:
|
||||
colorScheme.primary,
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
),
|
||||
const TextSpan(text: ' '),
|
||||
@@ -411,8 +361,7 @@ class _AudioPageState extends State<AudioPage> {
|
||||
_controller.index -= 1;
|
||||
}
|
||||
playlist.removeAt(index);
|
||||
(context as Element)
|
||||
.markNeedsBuild();
|
||||
(context as Element).markNeedsBuild();
|
||||
},
|
||||
iconColor: colorScheme.outline,
|
||||
size: 28,
|
||||
@@ -423,11 +372,48 @@ class _AudioPageState extends State<AudioPage> {
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
if (!_controller.reachStart) {
|
||||
child = refreshIndicator(
|
||||
onRefresh: () => _controller.loadPrev(context),
|
||||
isClampingScrollPhysics: true,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
return FractionallySizedBox(
|
||||
heightFactor:
|
||||
PlatformUtils.isMobile && !context.mediaQuerySize.isPortrait
|
||||
? 1.0
|
||||
: 0.7,
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: Get.back,
|
||||
borderRadius: StyleString.bottomSheetRadius,
|
||||
child: SizedBox(
|
||||
height: 35,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.outline,
|
||||
borderRadius: const .all(.circular(3)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: Theme(
|
||||
data: theme.copyWith(dividerColor: Colors.transparent),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
height: 1,
|
||||
color: colorScheme.outline.withValues(alpha: 0.1),
|
||||
|
||||
@@ -185,11 +185,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
child: CustomScrollView(
|
||||
key: ValueKey(scrollController.hashCode),
|
||||
controller: scrollController,
|
||||
physics: widget.isNested
|
||||
? const AlwaysScrollableScrollPhysics(
|
||||
parent: ClampingScrollPhysics(),
|
||||
)
|
||||
: const AlwaysScrollableScrollPhysics(),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (!isDialogue) ...[
|
||||
if ((widget.firstFloor ?? _controller.firstFloor.value)
|
||||
|
||||
Reference in New Issue
Block a user