- 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>
32 lines
881 B
Dart
32 lines
881 B
Dart
// Version: 1.0.0 | Created: 2026-04-01
|
|
// Root MaterialApp widget. Wires together theme + router.
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'router.dart';
|
|
import 'theme.dart';
|
|
|
|
/// Root application widget.
|
|
///
|
|
/// [ProviderScope] is set up in main.dart. This widget only handles
|
|
/// theme and routing — no business logic here.
|
|
class M8ChatApp extends ConsumerWidget {
|
|
const M8ChatApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final router = ref.watch(routerProvider);
|
|
|
|
return MaterialApp.router(
|
|
title: 'M8Chat',
|
|
theme: buildLightTheme(),
|
|
darkTheme: buildDarkTheme(),
|
|
// Default to dark — M8Chat is a dark-first chat app.
|
|
themeMode: ThemeMode.system,
|
|
routerConfig: router,
|
|
debugShowCheckedModeBanner: false,
|
|
);
|
|
}
|
|
}
|