The commissioned kingfisher (tool/kingfisher.svg) becomes Halkyon's again. Learn's launcher icon is the bird in its own colours on the white tile, its themed variants the bird's outline, and its launch screen shows the bird alone (ADR 0031, D12; ADR 0045, D14). Todo, Train and Meditate keep their glyphs on the launchers, and their launch screens show the bird in their own colours (D11). tool/app_icons.py draws all of them; halkyon_ui's LaunchScreen takes an emblem in place of the icon. Lucide's notice leaves Learn's licence list, as its icon no longer is Lucide's. Whats-New: Halkyon's kingfisher is back: Learn's icon, and on the screen while each app opens. Whats-New-De: Halkyons Eisvogel ist zurück: als Symbol von Learn und auf dem Bildschirm, während jede App startet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
64 lines
2.8 KiB
Dart
64 lines
2.8 KiB
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:halkyon_app/halkyon_app.dart';
|
|
import 'package:halkyon_learn_flutter/src/app/learn_frame.dart';
|
|
import 'package:halkyon_learn_flutter/src/app/learn_sessions.dart';
|
|
import 'package:halkyon_learn_flutter/src/core/bloc/app_bloc_observer.dart';
|
|
import 'package:halkyon_learn_flutter/src/core/dependencies/dependencies.dart';
|
|
import 'package:halkyon_learn_flutter/src/core/device_settings/widget/device_settings_scope.dart';
|
|
import 'package:halkyon_learn_flutter/src/core/theme/cjk_fonts.dart';
|
|
import 'package:halkyon_learn_flutter/src/feature/dictionary/data/mecab_license.dart';
|
|
import 'package:halkyon_learn_flutter/src/feature/geo_map/data/cldr_license.dart';
|
|
import 'package:halkyon_learn_flutter/src/feature/kanji/data/kanjivg_license.dart';
|
|
import 'package:halkyon_ui/halkyon_ui.dart';
|
|
import 'package:material_ui/material_ui.dart';
|
|
import 'package:path/path.dart' as p;
|
|
import 'package:serverpod_flutter/serverpod_flutter.dart';
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
Bloc.observer = const AppBlocObserver();
|
|
registerFontLicenses();
|
|
registerCjkFontLicenses();
|
|
registerKanjiVgLicense();
|
|
// The flags' notice and Unicode CLDR's for the subdivisions' names.
|
|
registerHalkyonAppLicenses();
|
|
// Unicode CLDR's for the world map's country names, as that copy gives it.
|
|
registerWorldMapCldrLicense();
|
|
registerMecabLicenses();
|
|
// The instance the build names (`--dart-define=SERVER_URL=…`, or
|
|
// `assets/config.json`): the first offered, and the one installs from
|
|
// before the choice go on with.
|
|
final builtIn = Instance.parse(await getServerUrl())!;
|
|
final device = await DeviceParts.create(builtIn: builtIn);
|
|
final instances = InstanceChoice(
|
|
FileInstanceStore(File(p.join(device.support, 'instances.json'))),
|
|
builtIn: builtIn,
|
|
forget: device.storage.forget,
|
|
sharesStorage: device.storage.sharesWith,
|
|
);
|
|
await instances.load(usedBefore: device.storage.usedBefore());
|
|
runApp(
|
|
WhatsNewScope(
|
|
whatsNew: WhatsNew(
|
|
AssetWhatsNewSource(rootBundle),
|
|
FileWhatsNewStore(File(p.join(device.support, 'whats_new.json'))),
|
|
version: device.appVersion.version,
|
|
),
|
|
// An instance chosen before: the app ran on this device already.
|
|
usedBefore: instances.current != null,
|
|
child: InstanceGate(
|
|
frame: learnFrame,
|
|
choice: instances,
|
|
// Only an instance of Halkyon Learn: one of another Halkyon app's
|
|
// answers too, but holds nothing of this app's.
|
|
checker: ServerpodInstanceChecker(app: 'learn'),
|
|
open: (instance) => Dependencies.create(instance, device),
|
|
readLook: () async => (await device.deviceSettingsStore.read()).look,
|
|
app: const LearnSessions(),
|
|
),
|
|
),
|
|
);
|
|
}
|