fix: chat input icons
This commit is contained in:
@@ -1123,14 +1123,22 @@ class _ModernChatInputState extends ConsumerState<ModernChatInput>
|
|||||||
message: tooltip,
|
message: tooltip,
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: enabled ? 1.0 : Alpha.disabled,
|
opacity: enabled ? 1.0 : Alpha.disabled,
|
||||||
child: IconButton(
|
child: Material(
|
||||||
onPressed: enabled
|
color: Colors.transparent,
|
||||||
? () {
|
child: InkWell(
|
||||||
HapticFeedback.selectionClick();
|
borderRadius: BorderRadius.circular(AppBorderRadius.circular),
|
||||||
_showOverflowSheet();
|
onTap: enabled
|
||||||
}
|
? () {
|
||||||
: null,
|
HapticFeedback.selectionClick();
|
||||||
icon: Icon(icon, size: iconSize, color: iconColor),
|
_showOverflowSheet();
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: SizedBox(
|
||||||
|
width: TouchTarget.minimum,
|
||||||
|
height: TouchTarget.minimum,
|
||||||
|
child: Icon(icon, size: iconSize, color: iconColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -1269,25 +1277,33 @@ class _ModernChatInputState extends ConsumerState<ModernChatInput>
|
|||||||
message: AppLocalizations.of(context)!.voiceInput,
|
message: AppLocalizations.of(context)!.voiceInput,
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: enabledMic ? Alpha.primary : Alpha.disabled,
|
opacity: enabledMic ? Alpha.primary : Alpha.disabled,
|
||||||
child: IconButton(
|
child: Material(
|
||||||
onPressed: enabledMic
|
color: Colors.transparent,
|
||||||
? () {
|
child: InkWell(
|
||||||
HapticFeedback.selectionClick();
|
borderRadius: BorderRadius.circular(AppBorderRadius.circular),
|
||||||
_toggleVoice();
|
onTap: enabledMic
|
||||||
}
|
? () {
|
||||||
: null,
|
HapticFeedback.selectionClick();
|
||||||
icon: Icon(
|
_toggleVoice();
|
||||||
Platform.isIOS ? CupertinoIcons.mic : Icons.mic,
|
}
|
||||||
size: IconSize.large,
|
: null,
|
||||||
color: _isRecording
|
child: SizedBox(
|
||||||
? context.conduitTheme.buttonPrimary
|
width: TouchTarget.minimum,
|
||||||
: (enabledMic
|
height: TouchTarget.minimum,
|
||||||
? context.conduitTheme.textPrimary.withValues(
|
child: Icon(
|
||||||
alpha: Alpha.strong,
|
Platform.isIOS ? CupertinoIcons.mic : Icons.mic,
|
||||||
)
|
size: IconSize.large,
|
||||||
: context.conduitTheme.textPrimary.withValues(
|
color: _isRecording
|
||||||
alpha: Alpha.disabled,
|
? context.conduitTheme.buttonPrimary
|
||||||
)),
|
: (enabledMic
|
||||||
|
? context.conduitTheme.textPrimary.withValues(
|
||||||
|
alpha: Alpha.strong,
|
||||||
|
)
|
||||||
|
: context.conduitTheme.textPrimary.withValues(
|
||||||
|
alpha: Alpha.disabled,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user