🧱 Realtime call infra
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
import 'package:auto_route/annotations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/call.dart';
|
||||
|
||||
@RoutePage()
|
||||
class CallScreen extends HookConsumerWidget {
|
||||
const CallScreen({super.key});
|
||||
final String roomId;
|
||||
const CallScreen({super.key, @PathParam('id') required this.roomId});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@ -12,7 +15,7 @@ class CallScreen extends HookConsumerWidget {
|
||||
final callNotifier = ref.read(callNotifierProvider.notifier);
|
||||
|
||||
useEffect(() {
|
||||
callNotifier.initialize();
|
||||
callNotifier.joinRoom(roomId);
|
||||
return null;
|
||||
}, []);
|
||||
|
||||
|
@ -33,6 +33,7 @@ import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:super_clipboard/super_clipboard.dart';
|
||||
import 'chat.dart';
|
||||
import 'package:island/widgets/chat/call_button.dart';
|
||||
|
||||
part 'room.g.dart';
|
||||
|
||||
@ -514,12 +515,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.video_call),
|
||||
onPressed: () {
|
||||
showInfoAlert('Oops', 'Not implemented yet...');
|
||||
},
|
||||
),
|
||||
AudioCallButton(roomId: id),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onPressed: () {
|
||||
|
Reference in New Issue
Block a user