mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 13:23:01 +02:00
Two-package monorepo: - horatio_core: pure Dart package (parser, SRS, planner) - horatio_app: Flutter UI (Bloc/Cubit, GoRouter, TTS) Features: - Script import (txt, docx, pdf) with drag-and-drop - Four script format parsers (colon, bracketed, parenthetical, screenplay) - SM-2 spaced repetition for line memorization - Rehearsal mode with TTS and line comparison - 5 bundled public domain scripts Quality: - 83 core tests + 160 app tests, both 100% branch coverage - Strict analysis (130+ lint rules, fatal-infos) - Dead code detection script (dead_code.sh) - run.sh pipeline: analyze, test, dead-code, run, web - Pre-commit hook for horatio test coverage
44 lines
1.4 KiB
Dart
44 lines
1.4 KiB
Dart
import 'package:device_preview/device_preview.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:horatio_app/bloc/script_import/script_import_cubit.dart';
|
|
import 'package:horatio_app/bloc/srs_review/srs_review_cubit.dart';
|
|
import 'package:horatio_app/router.dart';
|
|
import 'package:horatio_app/services/script_repository.dart';
|
|
import 'package:horatio_app/theme/app_theme.dart';
|
|
|
|
/// Root widget for the Horatio app.
|
|
class HoratioApp extends StatelessWidget {
|
|
/// Creates the [HoratioApp].
|
|
const HoratioApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) => MultiRepositoryProvider(
|
|
providers: [
|
|
RepositoryProvider<ScriptRepository>(
|
|
create: (_) => ScriptRepository(),
|
|
),
|
|
],
|
|
child: MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider<ScriptImportCubit>(
|
|
create: (context) => ScriptImportCubit(
|
|
repository: context.read<ScriptRepository>(),
|
|
),
|
|
),
|
|
BlocProvider<SrsReviewCubit>(
|
|
create: (_) => SrsReviewCubit(),
|
|
),
|
|
],
|
|
child: MaterialApp.router(
|
|
title: 'Horatio',
|
|
theme: AppTheme.light,
|
|
darkTheme: AppTheme.dark,
|
|
locale: DevicePreview.locale(context),
|
|
builder: DevicePreview.appBuilder,
|
|
routerConfig: appRouter,
|
|
),
|
|
),
|
|
);
|
|
}
|