simplify
This commit is contained in:
parent
19fa984a52
commit
241a8051cd
2 changed files with 5 additions and 11 deletions
|
|
@ -17,15 +17,15 @@ class PhoneticTranscriptionWidget extends StatefulWidget {
|
|||
final LanguageModel textLanguage;
|
||||
final TextStyle? style;
|
||||
final double? iconSize;
|
||||
final bool? lightBackground;
|
||||
final Color? iconColor;
|
||||
|
||||
const PhoneticTranscriptionWidget({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.textLanguage,
|
||||
this.lightBackground,
|
||||
this.style,
|
||||
this.iconSize,
|
||||
this.iconColor,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -168,14 +168,8 @@ class _PhoneticTranscriptionWidgetState
|
|||
child: Icon(
|
||||
_isPlaying ? Icons.pause_outlined : Icons.volume_up,
|
||||
size: widget.iconSize ?? 24,
|
||||
color: widget.lightBackground ??
|
||||
Theme.of(context).brightness == Brightness.light
|
||||
? _isPlaying
|
||||
? Theme.of(context).colorScheme.onPrimaryFixed
|
||||
: Theme.of(context).colorScheme.onTertiaryFixed
|
||||
: _isPlaying
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).iconTheme.color,
|
||||
color:
|
||||
widget.iconColor ?? Theme.of(context).iconTheme.color,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class OverlayMessage extends StatelessWidget {
|
|||
event,
|
||||
textColor,
|
||||
),
|
||||
lightBackground: ownMessage ? true : null,
|
||||
iconColor: textColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue