Refactor: Reduce .of(context) calls theme

Signed commit
This commit is contained in:
Thomas Klein Langenhorst 2024-08-04 14:09:36 +02:00
commit 5d2aaef3ca
No known key found for this signature in database
GPG key ID: CA868C3CB279DA5B
69 changed files with 525 additions and 501 deletions

View file

@ -206,6 +206,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(
@ -292,8 +294,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),