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

28 lines
815 B
Dart
Raw Normal View History

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