All checks were successful
CI / Windows build (push) Successful in 8m22s
Clean-room reimplementation of Saber's input model: we own the gesture pipeline so pen draws with real pressure (perfect_freehand), two-finger pinch zooms/pans, and palm is rejected (stylus-priority, 2nd-pointer cancels stroke). pdfrx renders one page at a time (PdfPageView, no gestures) under a shared transform; page-based nav. Material You theme via dynamic_color (system accent + seed fallback) and a floating tonal tool palette + page pill. Old pdfrx-overlay spike no longer wired.
32 lines
1.1 KiB
Dart
32 lines
1.1 KiB
Dart
// lib/editor/pdf/spike_launcher.dart
|
|
//
|
|
// THROWAWAY M1 entry: lets the user open the pdfrx pen/perf spike from the
|
|
// running app (so the CI-built Windows package can exercise MUST #3/#4/#5 on a
|
|
// real Surface Pen with the user's OWN large PDFs). Remove together with the
|
|
// rest of lib/editor/pdf/spike_* once M1 is signed off.
|
|
|
|
import 'package:file_picker/file_picker.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../canvas/pen_editor_screen.dart';
|
|
|
|
/// Opens a file picker for a PDF, then pushes the NEW pen-first canvas editor.
|
|
///
|
|
/// The 🧪 entry now opens the clean-room canvas (lib/editor/canvas/), which
|
|
/// OWNS the gesture pipeline (pressure, pinch-zoom, palm rejection). The old
|
|
/// spike_* files are left in place but no longer wired to this entry.
|
|
Future<void> openM1Spike(BuildContext context) async {
|
|
final result = await FilePicker.platform.pickFiles(
|
|
type: FileType.custom,
|
|
allowedExtensions: ['pdf'],
|
|
);
|
|
final path = result?.files.single.path;
|
|
if (path == null) return;
|
|
if (!context.mounted) return;
|
|
Navigator.of(context).push(
|
|
MaterialPageRoute(
|
|
builder: (_) => PenEditorScreen(pdfPath: path),
|
|
),
|
|
);
|
|
}
|