feat: Phase 1 complete — Matrix login, rooms, chat, profile
- Direct m.login.password auth against matrix.m8chat.au - Room list with unread badges, last message, timestamps - Chat timeline (text, images, files, replies, reactions) - Profile screen with expandable Notifications and Security sections - Olm E2EE initialisation (web WASM bootstrap) - Global error handler preventing Matrix SDK crashes - GoRouter with refreshListenable (no recreation on auth change) - Feature-first clean architecture: Riverpod + GoRouter + Drift - Deployed to https://app2.m8chat.au Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
73
lib/features/calls/presentation/call_screen.dart
Normal file
73
lib/features/calls/presentation/call_screen.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
// Version: 1.0.0 | Created: 2026-04-01
|
||||
// Call screen skeleton. Phase 2 will wire in LiveKit video/audio.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../domain/call_state.dart';
|
||||
import 'call_controller.dart';
|
||||
|
||||
class CallScreen extends ConsumerWidget {
|
||||
const CallScreen({super.key, required this.roomId});
|
||||
|
||||
final String roomId;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final callState = ref.watch(callControllerProvider);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.videocam_off_outlined,
|
||||
size: 80,
|
||||
color: Colors.white.withAlpha(153),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
switch (callState) {
|
||||
CallConnecting() => 'Connecting...',
|
||||
CallEnded(:final reason) => reason ?? 'Call ended.',
|
||||
_ => 'Call (Phase 2)',
|
||||
},
|
||||
style: const TextStyle(color: Colors.white, fontSize: 18),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Video calls will be available in the next release.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withAlpha(153),
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: FloatingActionButton(
|
||||
backgroundColor: Colors.red,
|
||||
onPressed: () {
|
||||
ref.read(callControllerProvider.notifier).endCall();
|
||||
context.pop();
|
||||
},
|
||||
child: const Icon(Icons.call_end, color: Colors.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user