2021-04-06 16:41:51 +00:00
|
|
|
import 'package:comunic/models/conversation.dart';
|
|
|
|
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import '../conversation_screen.dart';
|
|
|
|
|
|
|
|
/// Group conversation section
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class GroupConversationSection extends StatelessWidget {
|
|
|
|
final Conversation conv;
|
|
|
|
|
|
|
|
const GroupConversationSection({
|
2022-03-10 18:39:57 +00:00
|
|
|
Key? key,
|
|
|
|
required this.conv,
|
2022-03-11 16:02:06 +00:00
|
|
|
}) : super(key: key);
|
2021-04-06 16:41:51 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) => Stack(
|
|
|
|
children: [
|
|
|
|
ConversationScreen(
|
2022-03-10 18:39:57 +00:00
|
|
|
conversationID: conv.id!,
|
2021-04-06 16:41:51 +00:00
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: 1.0,
|
2021-04-06 16:47:38 +00:00
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
conv.callCapabilities != CallCapabilities.NONE
|
|
|
|
? IconButton(
|
|
|
|
icon: Icon(Icons.phone),
|
|
|
|
onPressed: () =>
|
2022-03-10 18:39:57 +00:00
|
|
|
MainController.of(context)!.startCall(conv.id!),
|
2021-04-06 16:47:38 +00:00
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
IconButton(
|
|
|
|
icon: Icon(Icons.settings),
|
2022-03-10 18:39:57 +00:00
|
|
|
onPressed: () => MainController.of(context)!
|
2021-04-06 16:47:38 +00:00
|
|
|
.openConversationSettingsRoute(conv),
|
|
|
|
),
|
|
|
|
],
|
2021-04-06 16:41:51 +00:00
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|