mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-28 23:25:52 +01:00
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.
30 lines
955 B
Dart
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);
|
|
});
|
|
}
|