整个课程和数据UI重新设计版本

This commit is contained in:
shenlei
2026-09-18 17:55:44 +09:00
parent febfd30f49
commit 0a4f97d105
154 changed files with 12366 additions and 4784 deletions
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:kouyu_english/main.dart';
/// Pumps the whole app and lets `AppState.load` finish. The load reads the
/// course packs and the AI config from the asset bundle, which is real file
/// I/O that fake time never completes, so the test waits for it in real time
/// until the loading spinner is gone.
Future<void> pumpLoadedApp(WidgetTester tester) async {
await tester.pumpWidget(const KouyuEnglishApp());
for (var i = 0; i < 100; i++) {
if (find.byType(CircularProgressIndicator).evaluate().isEmpty) break;
await tester.runAsync(
() => Future<void>.delayed(const Duration(milliseconds: 20)),
);
await tester.pump();
}
}