feat(video_calls): fixed falling test

This commit is contained in:
misha
2026-05-05 10:40:11 +03:00
parent 91ad51d340
commit b2072ab626
3 changed files with 33 additions and 31 deletions

View File

@@ -768,24 +768,26 @@ class _ChatHeaderVideoCallButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Tooltip(
message: S.of(context).video_call,
child: Material(
color: theme.colorScheme.onPrimary,
borderRadius: BorderRadius.circular(20),
elevation: 0,
child: InkWell(
onTap: onPressed,
customBorder: const CircleBorder(),
child: SizedBox(
width: 40,
height: 40,
child: Center(
child: Icon(Icons.videocam_rounded, color: appTheme.blueA400, size: 18),
),
final tooltipMessage = S.maybeOf(context)?.video_call;
final button = Material(
color: theme.colorScheme.onPrimary,
borderRadius: BorderRadius.circular(20),
elevation: 0,
child: InkWell(
onTap: onPressed,
customBorder: const CircleBorder(),
child: SizedBox(
width: 40,
height: 40,
child: Center(
child: Icon(Icons.videocam_rounded, color: appTheme.blueA400, size: 18),
),
),
),
);
if (tooltipMessage == null || tooltipMessage.isEmpty) {
return button;
}
return Tooltip(message: tooltipMessage, child: button);
}
}