Halkyon's shared packages
A pub workspace of the Dart packages Halkyon's apps share: halkyon_ui, Halkyon's look (the theme, fonts, layout and shared widgets, with texts in English and German), halkyon_core's low-level primitives and halkyon_interop's cross-app contracts. Dart 3.13 with LeanCode's lints, configured once at the root; apps take a package by git, pinned to a signed commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
commit
80fa7b9628
1 changed files with 6762 additions and 0 deletions
24
packages/halkyon_ui/test/layout/window_size_test.dart
Normal file
24
packages/halkyon_ui/test/layout/window_size_test.dart
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:halkyon_ui/halkyon_ui.dart';
|
||||
|
||||
void main() {
|
||||
test("Material 3's classes, by the window's width", () {
|
||||
expect(WindowSize.fromWidth(0), WindowSize.compact);
|
||||
expect(WindowSize.fromWidth(599.9), WindowSize.compact);
|
||||
expect(WindowSize.fromWidth(600), WindowSize.medium);
|
||||
expect(WindowSize.fromWidth(839.9), WindowSize.medium);
|
||||
expect(WindowSize.fromWidth(840), WindowSize.expanded);
|
||||
expect(WindowSize.fromWidth(1199.9), WindowSize.expanded);
|
||||
expect(WindowSize.fromWidth(1200), WindowSize.large);
|
||||
expect(WindowSize.fromWidth(1599.9), WindowSize.large);
|
||||
expect(WindowSize.fromWidth(1600), WindowSize.extraLarge);
|
||||
});
|
||||
|
||||
test('a rail from medium on, desktop layouts from expanded on', () {
|
||||
expect(WindowSize.compact.isAtLeastMedium, isFalse);
|
||||
expect(WindowSize.medium.isAtLeastMedium, isTrue);
|
||||
expect(WindowSize.medium.isAtLeastExpanded, isFalse);
|
||||
expect(WindowSize.expanded.isAtLeastExpanded, isTrue);
|
||||
expect(WindowSize.extraLarge.isAtLeastExpanded, isTrue);
|
||||
});
|
||||
}
|
||||
Reference in a new issue