import 'package:flutter_test/flutter_test.dart'; import 'package:halkyon_learn_flutter/src/feature/kanji/data/stroke_repository.dart'; /// The bundled strokes of [characters] in [language], read already: /// reading an asset is real input, which a widget test's fake clock never /// lets finish, so it happens outside it and the app gets this repository /// (`testDependencies(strokes: ...)`). Future loadedStrokes( WidgetTester tester, Iterable characters, { String? language, }) async { final strokes = StrokeRepository(); await tester.runAsync(() async { for (final character in characters) { await strokes.strokesOf(character, language: language); } }); return strokes; }