fix: Video player - Use theme to get the correct text color (#98)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-11-01 15:51:06 +01:00 committed by GitHub
parent 69912821e6
commit ab3d7ef85a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 7 deletions

View file

@ -311,7 +311,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
padding: const EdgeInsets.symmetric(horizontal: 12),
child: progressBar(mediaPlayback),
),
const SizedBox(height: 16),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -461,7 +461,9 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
child: Card(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Text(playbackModel?.label ?? ""),
child: Text(
playbackModel?.label ?? "",
),
),
),
),
@ -469,7 +471,9 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
Card(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Text('${item.streamModel?.displayProfile?.value} ${item.streamModel?.resolution?.value}'),
child: Text(
'${item.streamModel?.displayProfile?.value} ${item.streamModel?.resolution?.value}',
),
),
),
}
@ -494,8 +498,14 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(mediaPlayback.position.readAbleDuration),
Text("-${(mediaPlayback.duration - mediaPlayback.position).readAbleDuration}"),
Text(
mediaPlayback.position.readAbleDuration,
style: Theme.of(context).textTheme.bodyMedium,
),
Text(
"-${(mediaPlayback.duration - mediaPlayback.position).readAbleDuration}",
style: Theme.of(context).textTheme.bodyMedium,
),
],
),
],