Merge pull request #1261 from CodeThomnics/refactor/reduce_context_calls_theme

Refactor: Reduce .of(context) calls theme
This commit is contained in:
Krille-chan 2024-08-09 16:13:00 +02:00 committed by GitHub
commit 9731fb461a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 525 additions and 501 deletions

View file

@ -218,6 +218,8 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final statusText = this.statusText ??= _durationString ?? '00:00';
final audioPlayer = this.audioPlayer;
return Padding(
@ -304,8 +306,8 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
: Text(
'${audioPlayer.speed.toString()}x',
),
backgroundColor: Theme.of(context).colorScheme.secondary,
textColor: Theme.of(context).colorScheme.onSecondary,
backgroundColor: theme.colorScheme.secondary,
textColor: theme.colorScheme.onSecondary,
child: InkWell(
splashColor: widget.color.withAlpha(128),
borderRadius: BorderRadius.circular(64),