chore: style

Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
This commit is contained in:
The one with the braid 2023-08-26 23:10:10 +02:00
parent cf9609d699
commit 165226bee1
3 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,3 @@
import 'dart:typed_data';
import 'package:intl/locale.dart'; import 'package:intl/locale.dart';
abstract class FileMatcher { abstract class FileMatcher {

View file

@ -83,7 +83,11 @@ class PassFile {
}) { }) {
final files = _folder.map((e) => e.name).toList(); final files = _folder.map((e) => e.name).toList();
final path = FileMatcher.matchFile( final path = FileMatcher.matchFile(
files: files, name: name, scale: scale, locale: locale); files: files,
name: name,
scale: scale,
locale: locale,
);
if (path == null) return null; if (path == null) return null;
final file = _folder.singleWhere((element) => element.name == path); final file = _folder.singleWhere((element) => element.name == path);
final content = file.rawContent?.toUint8List() ?? file.content as Uint8List; final content = file.rawContent?.toUint8List() ?? file.content as Uint8List;

View file

@ -109,7 +109,11 @@ void main() {
extension: 'png', extension: 'png',
); );
final scaled = FileMatcher.matchScale( final scaled = FileMatcher.matchScale(
files: localized, name: 'logo', extension: 'png', scale: 6); files: localized,
name: 'logo',
extension: 'png',
scale: 6,
);
expect(scaled, 'logo@4x.png'); expect(scaled, 'logo@4x.png');
}); });
test('matchScale biggest neighbor', () { test('matchScale biggest neighbor', () {