mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-06 19:03:16 +02:00
Add the complete annotations feature for marking and annotating script text: Core models (horatio_core): - TextMark, LineNote, AnnotationSnapshot, MarkType, NoteCategory - Script.id field + UUID generation in text_parser Database layer (horatio_app): - Drift tables: text_marks, line_notes, annotation_snapshots - AppDatabase with AnnotationDao (full CRUD + streams + bulk replace) State management: - AnnotationCubit: mark/note CRUD, line selection, editing context - AnnotationHistoryCubit: snapshot save/restore with stream updates UI components: - MarkOverlay: colored span rendering for text marks - NoteIndicator: per-line note count badge - MarkTypePicker: 6-type ActionChip selector - NoteEditorSheet: category dropdown + text field bottom sheet - AnnotationEditorScreen: full editor with long-press marks + note editing - AnnotationHistoryScreen: snapshot timeline with restore dialog Wiring: - main.dart: async DB init with path_provider - app.dart: RepositoryProvider<AnnotationDao> - router.dart: /annotations + /annotation-history routes - role_selection_screen: Annotate Script option - run.sh: app_codegen step + coverage filtering for generated code 352 tests (105 core + 247 app), 100% branch coverage, zero dead code.
24 lines
679 B
Dart
24 lines
679 B
Dart
import 'dart:io';
|
|
|
|
import 'package:device_preview/device_preview.dart';
|
|
import 'package:drift/native.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:horatio_app/app.dart';
|
|
import 'package:horatio_app/database/app_database.dart';
|
|
import 'package:path/path.dart' as p;
|
|
import 'package:path_provider/path_provider.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
final dbFolder = await getApplicationDocumentsDirectory();
|
|
final dbFile = File(p.join(dbFolder.path, 'horatio.sqlite'));
|
|
final database = AppDatabase(NativeDatabase(dbFile));
|
|
|
|
runApp(
|
|
DevicePreview(
|
|
builder: (_) => HoratioApp(database: database),
|
|
),
|
|
);
|
|
}
|