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>
66 lines
2.3 KiB
Dart
66 lines
2.3 KiB
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:halkyon_ui/halkyon_ui.dart';
|
|
import 'package:material_ui/material_ui.dart';
|
|
|
|
import '../support/test_app.dart';
|
|
|
|
/// A transparent PNG of one pixel, standing in for an app's kingfisher.
|
|
final _emblem = MemoryImage(
|
|
Uint8List.fromList(const [
|
|
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, //
|
|
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
|
0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00,
|
|
0x0D, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9C, 0x63, 0x00, 0x01, 0x00, 0x00,
|
|
0x05, 0x00, 0x01, 0x0D, 0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49,
|
|
0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,
|
|
]),
|
|
);
|
|
|
|
void main() {
|
|
testWidgets("shows the kingfisher in the app's colours as it is, and "
|
|
"\"Halkyon\" over the app's word, read out as the app's name", (
|
|
tester,
|
|
) async {
|
|
await tester.pumpWidget(
|
|
testApp(
|
|
LaunchScreen(emblem: _emblem, product: 'Todo', name: 'Halkyon Todo'),
|
|
),
|
|
);
|
|
|
|
// The bird on the screen itself (ADR 0031, D11), not a rounded tile.
|
|
expect(find.byType(Image), findsOneWidget);
|
|
expect(
|
|
find.ancestor(of: find.byType(Image), matching: find.byType(ClipRRect)),
|
|
findsNothing,
|
|
);
|
|
expect(
|
|
tester.getSize(find.byType(Image)),
|
|
const Size.square(LaunchScreen.emblemSize),
|
|
);
|
|
final brand = tester.getRect(find.text('Halkyon'));
|
|
final product = tester.getRect(find.text('Todo'));
|
|
expect(product.top, greaterThanOrEqualTo(brand.bottom - 1));
|
|
expect(product.center.dx, moreOrLessEquals(brand.center.dx));
|
|
expect(find.bySemanticsLabel('Halkyon Todo'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('the wordmark is cobalt over copper, and silent to screen '
|
|
'readers', (tester) async {
|
|
await tester.pumpWidget(
|
|
testApp(const Scaffold(body: BrandWordmark(product: 'Train'))),
|
|
);
|
|
|
|
final scheme = appTheme(Brightness.light).colorScheme;
|
|
expect(
|
|
tester.widget<Text>(find.text('Halkyon')).style?.color,
|
|
scheme.primary,
|
|
);
|
|
expect(
|
|
tester.widget<Text>(find.text('Train')).style?.color,
|
|
scheme.tertiary,
|
|
);
|
|
expect(find.bySemanticsLabel('Train'), findsNothing);
|
|
});
|
|
}
|