feat(flutter): 应用克莱因蓝主题与印尼语适配
This commit is contained in:
1 parent
e1147cfcba
commit
10d448c8ba
31 files changed
+891
-521
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('should_use_theme_tokens_when_lib_code_is_scanned_for_legacy_blue', () {
|
||||
final pattern = RegExp(
|
||||
r'0xFF2F7BFF|0xff2F7BFF|0xFF8FB4FF|0xff8FB4FF|(?<!App)Colors\.blue\b',
|
||||
);
|
||||
final violations = <String>[];
|
||||
for (final entity in Directory('lib').listSync(recursive: true)) {
|
||||
if (entity is! File || !entity.path.endsWith('.dart')) continue;
|
||||
final lines = entity.readAsLinesSync();
|
||||
for (var index = 0; index < lines.length; index++) {
|
||||
if (pattern.hasMatch(lines[index])) {
|
||||
violations.add('${entity.path}:${index + 1}: ${lines[index].trim()}');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
expect(violations, isEmpty, reason: violations.join('\n'));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user