fix: make audio player thumb color consistent
This commit is contained in:
parent
9c68ce6982
commit
835bd4e009
1 changed files with 55 additions and 38 deletions
|
|
@ -599,46 +599,63 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
|||
),
|
||||
SizedBox(
|
||||
height: 32,
|
||||
child: Slider(
|
||||
// #Pangea
|
||||
// thumbColor:
|
||||
// widget.event.senderId ==
|
||||
// widget.event.room.client.userID
|
||||
// ? theme.colorScheme.onPrimary
|
||||
// : theme.colorScheme.primary,
|
||||
thumbColor:
|
||||
widget.senderId ==
|
||||
Matrix.of(context).client.userID
|
||||
? widget.color
|
||||
: theme.colorScheme.onSurface,
|
||||
// #Pangea
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
thumbColor:
|
||||
widget.senderId ==
|
||||
Matrix.of(context).client.userID
|
||||
? widget.color
|
||||
: theme.colorScheme.onSurface,
|
||||
disabledThumbColor:
|
||||
widget.senderId ==
|
||||
Matrix.of(context).client.userID
|
||||
? widget.color
|
||||
: theme.colorScheme.onSurface,
|
||||
activeTrackColor: waveform == null
|
||||
? widget.color
|
||||
: Colors.transparent,
|
||||
inactiveTrackColor: waveform == null
|
||||
? widget.color.withAlpha(128)
|
||||
: Colors.transparent,
|
||||
),
|
||||
// Pangea#
|
||||
activeColor: waveform == null
|
||||
? widget.color
|
||||
: Colors.transparent,
|
||||
inactiveColor: waveform == null
|
||||
? widget.color.withAlpha(128)
|
||||
: Colors.transparent,
|
||||
max: maxPosition,
|
||||
value: currentPosition,
|
||||
// #Pangea
|
||||
onChanged: !widget.enableClicks
|
||||
? null
|
||||
: (position) => audioPlayer == null
|
||||
? _onButtonTap()
|
||||
: audioPlayer.seek(
|
||||
Duration(
|
||||
milliseconds: position
|
||||
.round(),
|
||||
child: Slider(
|
||||
// #Pangea
|
||||
// thumbColor:
|
||||
// widget.event.senderId ==
|
||||
// widget.event.room.client.userID
|
||||
// ? theme.colorScheme.onPrimary
|
||||
// : theme.colorScheme.primary,
|
||||
// activeColor: waveform == null
|
||||
// ? widget.color
|
||||
// : Colors.transparent,
|
||||
// inactiveColor: waveform == null
|
||||
// ? widget.color.withAlpha(128)
|
||||
// : Colors.transparent,
|
||||
// Pangea#
|
||||
max: maxPosition,
|
||||
value: currentPosition,
|
||||
// #Pangea
|
||||
onChanged: !widget.enableClicks
|
||||
? null
|
||||
: (position) => audioPlayer == null
|
||||
? _onButtonTap()
|
||||
: audioPlayer.seek(
|
||||
Duration(
|
||||
milliseconds: position
|
||||
.round(),
|
||||
),
|
||||
),
|
||||
),
|
||||
// onChanged: (position) => audioPlayer == null
|
||||
// ? _onButtonTap()
|
||||
// : audioPlayer.seek(
|
||||
// Duration(
|
||||
// milliseconds: position.round(),
|
||||
// ),
|
||||
// ),
|
||||
// Pangea#
|
||||
// onChanged: (position) => audioPlayer == null
|
||||
// ? _onButtonTap()
|
||||
// : audioPlayer.seek(
|
||||
// Duration(
|
||||
// milliseconds: position.round(),
|
||||
// ),
|
||||
// ),
|
||||
// Pangea#
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue