mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 00:12:22 -06:00
feat: Further migrations to go_router, add onclick to document previews
This commit is contained in:
@@ -8,6 +8,13 @@ import 'package:paperless_api/src/models/labels/matching_algorithm.dart';
|
||||
|
||||
part 'label_model.g.dart';
|
||||
|
||||
enum LabelType {
|
||||
correspondent,
|
||||
documentType,
|
||||
tag,
|
||||
storagePath,
|
||||
}
|
||||
|
||||
sealed class Label extends Equatable implements Comparable {
|
||||
static const idKey = "id";
|
||||
static const nameKey = "name";
|
||||
|
||||
@@ -124,19 +124,22 @@ class _ScanState extends State<Scan> {
|
||||
imagePath = filePath;
|
||||
});
|
||||
|
||||
EdgeDetectionResult result = await EdgeDetector().detectEdgesFromFile(filePath);
|
||||
EdgeDetectionResult result =
|
||||
await EdgeDetector().detectEdgesFromFile(filePath);
|
||||
|
||||
setState(() {
|
||||
edgeDetectionResult = result;
|
||||
});
|
||||
}
|
||||
|
||||
Future _processImage(String filePath, EdgeDetectionResult edgeDetectionResult) async {
|
||||
Future _processImage(
|
||||
String filePath, EdgeDetectionResult edgeDetectionResult) async {
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool result = await EdgeDetector().processImageFromFile(filePath, edgeDetectionResult);
|
||||
bool result = await EdgeDetector()
|
||||
.processImageFromFile(filePath, edgeDetectionResult);
|
||||
|
||||
if (result == false) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user