2024-06-01 12:18:25 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
2024-07-23 17:17:41 +00:00
|
|
|
import 'package:solian/providers/call.dart';
|
2024-06-01 12:18:25 +00:00
|
|
|
|
|
|
|
class ChatCallCurrentIndicator extends StatelessWidget {
|
|
|
|
const ChatCallCurrentIndicator({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-08-19 17:10:15 +00:00
|
|
|
final ChatCallProvider call = Get.find();
|
2024-06-01 12:18:25 +00:00
|
|
|
|
2024-08-02 09:14:23 +00:00
|
|
|
return Obx(() {
|
2024-08-19 17:10:15 +00:00
|
|
|
if (call.current.value == null || call.channel.value == null) {
|
2024-08-02 09:14:23 +00:00
|
|
|
return const SizedBox();
|
|
|
|
}
|
2024-06-01 12:18:25 +00:00
|
|
|
|
2024-08-02 09:14:23 +00:00
|
|
|
return ListTile(
|
|
|
|
tileColor: Theme.of(context).colorScheme.surfaceContainerHigh,
|
|
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 32),
|
|
|
|
leading: const Icon(Icons.call),
|
2024-08-19 17:10:15 +00:00
|
|
|
title: Text(call.channel.value!.name),
|
2024-08-02 09:14:23 +00:00
|
|
|
subtitle: Text('callAlreadyOngoing'.tr),
|
|
|
|
);
|
|
|
|
});
|
2024-06-01 12:18:25 +00:00
|
|
|
}
|
|
|
|
}
|