Bug fixes (Flutter): - Wrap multi-statement DB writes (insert/update/delete note, deleteDocument, deletePageData, OCR FTS merge, migrations) in transactions to prevent data loss on interruption and a read-modify-write FTS race. - Fix PdfDocument leaks on exception (try/finally dispose) and preserve image aspect ratio when stamping images onto PDF pages. - Guard file-picker against empty selection (was .single -> crash). - Fix eraser ConcurrentModificationError and unmodifiable-list crash on PDF pages; capture page synchronously on save to stop wrong-page data loss. - Fix Riverpod DB-not-ready races, broken pull-to-refresh, settings load race, and search N+1; transform stored annotations on PDF page rotation. - Normalize pen pressure for devices without a pressure range. - PPT: single source of truth for slide strokes so ink displays and exports. UI/UX: - Material 3 typography, theme-aware colors (dark-mode fixes), hover cursors and right-click/visible actions on desktop, keyboard shortcuts (undo/redo/ save/find), toolbar overflow handling, friendlier empty states, semantic OCR status badges, relative timestamps, 1-based page indicators, large-deck PPT navigation, and a scratchpad-scope label in split view. Server (optional backend): - Persist JWT secret (was per-process random), block path traversal in storage, fix CORS '*'+credentials, add OCR job ownership checks, last-writer-wins sync guard, constant-time login, and split out heavy OCR deps so the API/tests run without them. CI: Gitea workflows for format+analyze+test (Linux, system sqlite) and a Windows release build; pristine `flutter analyze`, all Flutter and server tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
292 lines
8.7 KiB
Dart
292 lines
8.7 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'ink_point.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
|
);
|
|
|
|
InkPoint _$InkPointFromJson(Map<String, dynamic> json) {
|
|
return _InkPoint.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$InkPoint {
|
|
double get x => throw _privateConstructorUsedError;
|
|
double get y => throw _privateConstructorUsedError;
|
|
double get pressure => throw _privateConstructorUsedError;
|
|
double get tilt => throw _privateConstructorUsedError;
|
|
int get timestamp => throw _privateConstructorUsedError;
|
|
InputDeviceKind get pointerDeviceKind => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this InkPoint to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of InkPoint
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$InkPointCopyWith<InkPoint> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $InkPointCopyWith<$Res> {
|
|
factory $InkPointCopyWith(InkPoint value, $Res Function(InkPoint) then) =
|
|
_$InkPointCopyWithImpl<$Res, InkPoint>;
|
|
@useResult
|
|
$Res call({
|
|
double x,
|
|
double y,
|
|
double pressure,
|
|
double tilt,
|
|
int timestamp,
|
|
InputDeviceKind pointerDeviceKind,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$InkPointCopyWithImpl<$Res, $Val extends InkPoint>
|
|
implements $InkPointCopyWith<$Res> {
|
|
_$InkPointCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of InkPoint
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? x = null,
|
|
Object? y = null,
|
|
Object? pressure = null,
|
|
Object? tilt = null,
|
|
Object? timestamp = null,
|
|
Object? pointerDeviceKind = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
x: null == x
|
|
? _value.x
|
|
: x // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
y: null == y
|
|
? _value.y
|
|
: y // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
pressure: null == pressure
|
|
? _value.pressure
|
|
: pressure // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
tilt: null == tilt
|
|
? _value.tilt
|
|
: tilt // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
timestamp: null == timestamp
|
|
? _value.timestamp
|
|
: timestamp // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
pointerDeviceKind: null == pointerDeviceKind
|
|
? _value.pointerDeviceKind
|
|
: pointerDeviceKind // ignore: cast_nullable_to_non_nullable
|
|
as InputDeviceKind,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$InkPointImplCopyWith<$Res>
|
|
implements $InkPointCopyWith<$Res> {
|
|
factory _$$InkPointImplCopyWith(
|
|
_$InkPointImpl value,
|
|
$Res Function(_$InkPointImpl) then,
|
|
) = __$$InkPointImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
double x,
|
|
double y,
|
|
double pressure,
|
|
double tilt,
|
|
int timestamp,
|
|
InputDeviceKind pointerDeviceKind,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$InkPointImplCopyWithImpl<$Res>
|
|
extends _$InkPointCopyWithImpl<$Res, _$InkPointImpl>
|
|
implements _$$InkPointImplCopyWith<$Res> {
|
|
__$$InkPointImplCopyWithImpl(
|
|
_$InkPointImpl _value,
|
|
$Res Function(_$InkPointImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of InkPoint
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? x = null,
|
|
Object? y = null,
|
|
Object? pressure = null,
|
|
Object? tilt = null,
|
|
Object? timestamp = null,
|
|
Object? pointerDeviceKind = null,
|
|
}) {
|
|
return _then(
|
|
_$InkPointImpl(
|
|
x: null == x
|
|
? _value.x
|
|
: x // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
y: null == y
|
|
? _value.y
|
|
: y // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
pressure: null == pressure
|
|
? _value.pressure
|
|
: pressure // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
tilt: null == tilt
|
|
? _value.tilt
|
|
: tilt // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
timestamp: null == timestamp
|
|
? _value.timestamp
|
|
: timestamp // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
pointerDeviceKind: null == pointerDeviceKind
|
|
? _value.pointerDeviceKind
|
|
: pointerDeviceKind // ignore: cast_nullable_to_non_nullable
|
|
as InputDeviceKind,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$InkPointImpl implements _InkPoint {
|
|
const _$InkPointImpl({
|
|
required this.x,
|
|
required this.y,
|
|
this.pressure = 0.5,
|
|
this.tilt = 0.0,
|
|
required this.timestamp,
|
|
this.pointerDeviceKind = InputDeviceKind.unknown,
|
|
});
|
|
|
|
factory _$InkPointImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$InkPointImplFromJson(json);
|
|
|
|
@override
|
|
final double x;
|
|
@override
|
|
final double y;
|
|
@override
|
|
@JsonKey()
|
|
final double pressure;
|
|
@override
|
|
@JsonKey()
|
|
final double tilt;
|
|
@override
|
|
final int timestamp;
|
|
@override
|
|
@JsonKey()
|
|
final InputDeviceKind pointerDeviceKind;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'InkPoint(x: $x, y: $y, pressure: $pressure, tilt: $tilt, timestamp: $timestamp, pointerDeviceKind: $pointerDeviceKind)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$InkPointImpl &&
|
|
(identical(other.x, x) || other.x == x) &&
|
|
(identical(other.y, y) || other.y == y) &&
|
|
(identical(other.pressure, pressure) ||
|
|
other.pressure == pressure) &&
|
|
(identical(other.tilt, tilt) || other.tilt == tilt) &&
|
|
(identical(other.timestamp, timestamp) ||
|
|
other.timestamp == timestamp) &&
|
|
(identical(other.pointerDeviceKind, pointerDeviceKind) ||
|
|
other.pointerDeviceKind == pointerDeviceKind));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
x,
|
|
y,
|
|
pressure,
|
|
tilt,
|
|
timestamp,
|
|
pointerDeviceKind,
|
|
);
|
|
|
|
/// Create a copy of InkPoint
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$InkPointImplCopyWith<_$InkPointImpl> get copyWith =>
|
|
__$$InkPointImplCopyWithImpl<_$InkPointImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$InkPointImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _InkPoint implements InkPoint {
|
|
const factory _InkPoint({
|
|
required final double x,
|
|
required final double y,
|
|
final double pressure,
|
|
final double tilt,
|
|
required final int timestamp,
|
|
final InputDeviceKind pointerDeviceKind,
|
|
}) = _$InkPointImpl;
|
|
|
|
factory _InkPoint.fromJson(Map<String, dynamic> json) =
|
|
_$InkPointImpl.fromJson;
|
|
|
|
@override
|
|
double get x;
|
|
@override
|
|
double get y;
|
|
@override
|
|
double get pressure;
|
|
@override
|
|
double get tilt;
|
|
@override
|
|
int get timestamp;
|
|
@override
|
|
InputDeviceKind get pointerDeviceKind;
|
|
|
|
/// Create a copy of InkPoint
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$InkPointImplCopyWith<_$InkPointImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|