chore: clean analyzer to zero issues
Some checks failed
CI / Windows build (push) Has been cancelled

Whole-project `flutter analyze` exited 1 on 17 pre-existing info/warning
lints (no errors) in dev tools and test files. Clean them so analyze is
green:
- editor_repository_test: drop the redundant sqflite_common import; keep
  the used utils import with a transitive-dep ignore.
- pen_* widget tests: `(_, __)` wildcard params -> `(_, _)`.
- search_snippet_test / gen_bench_pdf / gen_dense_strokes: drop needless
  interpolation braces; remove an unused `Size` show and an unused local;
  mark the gen tool as print-allowed.

No runtime behavior changed. flutter analyze: No issues found. Affected
tests: 22/22 pass.
This commit is contained in:
2026-06-23 09:57:04 +08:00
parent 2c9f6037f7
commit d1b265dc70
8 changed files with 10 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
// ignore_for_file: avoid_print
// tool/gen_dense_strokes.dart
//
// Generates synthetic ink-stroke datasets as JSON matching InkStroke.toJson()
@@ -52,7 +53,7 @@ void main(List<String> args) {
final sizeKb = (File(outputPath).lengthSync() / 1024).toStringAsFixed(1);
print('Output: $outputPath');
print('Size: ${sizeKb} KB');
print('Size: $sizeKb KB');
for (final count in counts) {
print(' "$count": ${(result[count.toString()] as List).length} strokes');
}
@@ -183,15 +184,6 @@ void _verifyRoundTrip(dynamic dataset) {
final encoded = jsonEncode(raw);
final decoded = jsonDecode(encoded) as Map<String, dynamic>;
// Assert required InkStroke fields exist with correct types.
void check(String field, Type type) {
final val = decoded[field];
assert(
val == null || val.runtimeType.toString().contains(type.toString()) || val is num || val is String || val is bool || val is List,
'Field "$field" missing or wrong type: ${val.runtimeType}',
);
}
assert(decoded['id'] is String, 'id must be String');
assert(decoded['points'] is List, 'points must be List');
assert(decoded['tool'] == 'pen', 'tool enum must be "pen"');