syn with upstream (#985)

Co-authored-by: misha <mikhail_zakharov_15482356@mail.ru>
Co-authored-by: misha <misha@noreply.localhost>
Reviewed-on: eatvio/eatvio_app#985
This commit is contained in:
2026-05-27 18:37:17 +00:00
parent 5d86b7c71b
commit 204a55917a
66 changed files with 3976 additions and 105 deletions

View File

@@ -24,6 +24,7 @@ import 'package:eatvio_app/features/feed/models/plan_pagination_model.dart';
import 'package:eatvio_app/features/order_info/presentation/info_by_order_screen.dart';
import 'package:eatvio_app/features/plans/enums/chosen_plan_state_enum.dart';
import 'package:eatvio_app/features/user_details/presentation/user_details_screen.dart';
import 'package:eatvio_app/features/video_calls/presentation/pages/video_call_screen.dart';
import 'package:eatvio_app/generated/l10n.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/cupertino.dart';
@@ -233,6 +234,23 @@ class _ChatScreenState extends State<ChatScreen> {
],
),
),
actions: [
Padding(
padding: const EdgeInsetsDirectional.only(end: 8),
child: _ChatHeaderVideoCallButton(
onPressed: () {
GoRouter.of(context).pushNamed(
VideoCallScreen.name,
extra: <String, dynamic>{
'conversationUuid': widget.uuid,
'counterpartName': state.chatRoom.users.receiver.name,
'localParticipantName': state.chatRoom.users.sender.name,
},
);
},
),
),
],
),
body: SafeArea(
child: Stack(
@@ -741,3 +759,35 @@ class _ChatScreenState extends State<ChatScreen> {
);
}
}
class _ChatHeaderVideoCallButton extends StatelessWidget {
const _ChatHeaderVideoCallButton({required this.onPressed});
final VoidCallback onPressed;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
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);
}
}