mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-18 15:29:35 +00:00
格式化代码
This commit is contained in:
parent
94f1376572
commit
de8b0bc066
5 changed files with 65 additions and 30 deletions
|
|
@ -36,7 +36,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
|||
final vanishingPercentage = 1 - percentageMiniplayer;
|
||||
// final progress =
|
||||
// useStream(player.slowPositionStreamInBook, initialData: Duration.zero);
|
||||
final progress = useStream(player.positionStream, initialData: Duration.zero);
|
||||
final progress =
|
||||
useStream(player.positionStream, initialData: Duration.zero);
|
||||
|
||||
final bookMetaExpanded = ref.watch(currentBookMetadataProvider);
|
||||
|
||||
|
|
@ -58,7 +59,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
|||
context.pushNamed(
|
||||
Routes.libraryItem.name,
|
||||
pathParameters: {
|
||||
Routes.libraryItem.pathParamName!: player.book!.libraryItemId,
|
||||
Routes.libraryItem.pathParamName!:
|
||||
player.book!.libraryItemId,
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
@ -92,7 +94,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),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -138,7 +143,8 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
|||
child: LinearProgressIndicator(
|
||||
// value: (progress.data ?? Duration.zero).inSeconds /
|
||||
// player.book!.duration.inSeconds,
|
||||
value: (progress.data ?? Duration.zero).inSeconds / player.duration!.inSeconds,
|
||||
value: (progress.data ?? Duration.zero).inSeconds /
|
||||
player.duration!.inSeconds,
|
||||
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue