improvements

main_production_copilot
Sikander Saleem 6 hours ago
parent 7bb4ae420d
commit 5544587543

@ -7,6 +7,7 @@ import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/new_views/common_widgets/default_app_bar.dart';
import 'package:test_sa/thinking_orbs/src/thinking_orb.dart';
import '../controller/copilot_provider.dart';
import '../widgets/copilot_message_bubble.dart';
@ -167,9 +168,13 @@ class _CopilotPushToTalkPageState extends State<CopilotPushToTalkPage> {
color: isRecording ? Colors.red : AppColor.primary10,
),
child: isBusy
? const Padding(
padding: EdgeInsets.all(24),
child: CircularProgressIndicator(color: Colors.white, strokeWidth: 2.5),
? Padding(
padding: const EdgeInsets.all(12),
child: ThinkingOrb(
size: 48,
state: ThinkingOrbState.working,
theme: !context.isDark ? ThinkingOrbTheme.dark : ThinkingOrbTheme.light,
),
)
: Icon(Icons.mic_rounded, color: Colors.white, size: isRecording ? 44 : 36),
),
@ -185,4 +190,3 @@ class _CopilotPushToTalkPageState extends State<CopilotPushToTalkPage> {
);
}
}

@ -207,6 +207,7 @@ class CopilotMessageBubble extends StatelessWidget {
if (message.ttsAudioClips.isNotEmpty) ...[
8.height,
TtsVoicePlayer(key: ValueKey('${message.id}_audio'), clips: message.ttsAudioClips),
8.height,
],
Align(
alignment: Alignment.centerRight,

@ -213,27 +213,25 @@ class _TtsVoicePlayerState extends State<TtsVoicePlayer> {
style: AppTextStyles.tinyFont.copyWith(color: AppColor.textStyleColor(context)),
),
4.width,
IconButton(
onPressed: _cycleSpeed,
style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
constraints: const BoxConstraints(),
tooltip: "Playback speed",
icon: Text(
_speedLabel,
style: AppTextStyles.tinyFont.copyWith(color: AppColor.textStyleColor(context), fontWeight: FontWeight.w600),
),
),
IconButton(
onPressed: _toggleMute,
style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
constraints: const BoxConstraints(),
tooltip: _muted ? "Unmute" : "Mute",
icon: Icon(_muted ? Icons.volume_off_rounded : Icons.volume_up_rounded, size: 18, color: AppColor.icon2Color(context)),
),
// IconButton(
// onPressed: _cycleSpeed,
// style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
// constraints: const BoxConstraints(),
// tooltip: "Playback speed",
// icon: Text(
// _speedLabel,
// style: AppTextStyles.tinyFont.copyWith(color: AppColor.textStyleColor(context), fontWeight: FontWeight.w600),
// ),
// ),
// IconButton(
// onPressed: _toggleMute,
// style: const ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
// constraints: const BoxConstraints(),
// tooltip: _muted ? "Unmute" : "Mute",
// icon: Icon(_muted ? Icons.volume_off_rounded : Icons.volume_up_rounded, size: 18, color: AppColor.icon2Color(context)),
// ),
],
),
);
}
}

Loading…
Cancel
Save