格式化代码

This commit is contained in:
rang 2025-10-25 10:38:56 +08:00
parent a28547685b
commit b3a9d76c78
24 changed files with 611 additions and 451 deletions

View file

@ -34,7 +34,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
final currentChapter = ref.watch(currentPlayingChapterProvider);
final vanishingPercentage = 1 - percentageMiniplayer;
final progress = useStream(player.slowPositionStreamInBook, initialData: Duration.zero);
final progress =
useStream(player.slowPositionStreamInBook, initialData: Duration.zero);
final bookMetaExpanded = ref.watch(currentBookMetadataProvider);
@ -56,7 +57,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
context.pushNamed(
Routes.libraryItem.name,
pathParameters: {
Routes.libraryItem.pathParamName!: player.book!.libraryItemId,
Routes.libraryItem.pathParamName!:
player.book!.libraryItemId,
},
);
},
@ -90,7 +92,10 @@ class PlayerWhenMinimized extends HookConsumerWidget {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7),
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.7),
),
),
],
@ -134,7 +139,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
SizedBox(
height: barHeight,
child: LinearProgressIndicator(
value: (progress.data ?? Duration.zero).inSeconds / player.book!.duration.inSeconds,
value: (progress.data ?? Duration.zero).inSeconds /
player.book!.duration.inSeconds,
color: Theme.of(context).colorScheme.onPrimaryContainer,
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
),