Add app source and tests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
alvocool
2026-10-11 10:15:30 +03:00
parent 7e246255c2
commit 38881d1fe1
135 changed files with 21057 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import '../parent/ParentViewModel.dart';
import 'ConnectSplash.dart';
class ViewSplash extends ParentViewModel {
ConnectSplash connection;
ViewSplash(super.context, this.connection);
/// Reads the stored servers, deployment history and theme preference, then
/// hands them to the screen. The splash is deliberately held for a minimum
/// duration so a fast read doesn't make it flash.
void bootstrap() async {
final started = DateTime.now();
try {
final servers = await getDataManager().getServers();
final history = await getDataManager().getDeployments();
final themeMode = await getDataManager().getThemeMode();
const minShow = Duration(milliseconds: 1300);
final elapsed = DateTime.now().difference(started);
if (elapsed < minShow) await Future.delayed(minShow - elapsed);
connection.onBootstrapped(servers, history, themeMode);
} catch (error) {
handleError(error, bootstrap, () {}, "Retry");
}
}
}