Solian/lib/widgets/chat/call/chat_call_indicator.dart

27 lines
774 B
Dart
Raw Normal View History

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) {
final ChatCallProvider call = Get.find();
2024-06-01 12:18:25 +00:00
2024-08-02 09:14:23 +00:00
return Obx(() {
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),
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
}
}