Files
SpotiFLAC-Mobile/test/rtl_layout_test.dart
T
zarzet a428b37879 feat(i18n): mirror layouts for right-to-left languages
Use directional insets, alignments, positions and borders so Arabic and
other RTL locales lay out from the right. Mornye chevrons use the
CupertinoIcons glyphs that match text direction, synced lyric voices
align to start and end, and transport controls, seek bars and progress
stay left to right as media timelines do.
2026-10-21 14:59:26 +07:00

30 lines
955 B
Dart

import 'package:flutter/cupertino.dart' show CupertinoIcons;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mornye/theme/mornye_icons.dart';
void main() {
test('Mornye directional icons mirror in right-to-left layouts', () {
for (final icon in [
mornyeIconFor(Icons.arrow_back),
mornyeIconFor(Icons.chevron_left),
mornyeArrowForward,
CupertinoIcons.back,
CupertinoIcons.forward,
CupertinoIcons.right_chevron,
]) {
expect(icon.matchTextDirection, isTrue, reason: '$icon');
}
// The mirrored glyphs are the same shapes as the SF-style names.
expect(
CupertinoIcons.back.codePoint,
CupertinoIcons.chevron_back.codePoint,
);
expect(
CupertinoIcons.forward.codePoint,
CupertinoIcons.chevron_forward.codePoint,
);
expect(mornyeArrowForward.codePoint, CupertinoIcons.arrow_right.codePoint);
});
}