Files
sharedinbox/lib/main.dart
T
Thomas GüttlerandClaude Opus 4.7 2e2b7c3d9f fix: Android E2E aliceTile race + bundle deploy-android infra
The Android UI integration test failed at tap(aliceTile) with "0 widgets"
even though pumpUntil had just found the tile. On the slow software-rendered
emulator the route-pop animation finalises during pumpUntil's trailing 300 ms
settle, briefly leaving the tile out of the tree. Re-confirm with a second
pumpUntil before the tap.

Bundles the previously uncommitted infra changes that make task deploy-android
run end-to-end inside nix develop: Linux desktop runtime libs + GL software
rendering env in flake.nix, path_provider_android pin to <2.3 to avoid the
libdartjni SIGSEGV, deferred DB-path resolution after WidgetsFlutterBinding,
+iglx for xvfb-run, platform-tools on PATH, and a single pre-commit script
replacing the dart-format / task-check-fast pair.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 12:36:30 +02:00

48 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sharedinbox/data/db/database.dart';
import 'package:sharedinbox/di.dart';
import 'package:sharedinbox/ui/router.dart';
void main({List<Override> overrides = const []}) async {
WidgetsFlutterBinding.ensureInitialized();
await initDatabasePath();
runApp(ProviderScope(overrides: overrides, child: const SharedInboxApp()));
}
class SharedInboxApp extends ConsumerStatefulWidget {
const SharedInboxApp({super.key});
@override
ConsumerState<SharedInboxApp> createState() => _SharedInboxAppState();
}
class _SharedInboxAppState extends ConsumerState<SharedInboxApp> {
@override
void initState() {
super.initState();
// Start background IMAP sync once — runs for the lifetime of the app.
ref.read(syncManagerProvider).start();
}
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'SharedInbox',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.indigo,
brightness: Brightness.dark,
),
useMaterial3: true,
),
routerConfig: router,
);
}
}