mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-05 12:58:47 +00:00
chore: style
Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
This commit is contained in:
parent
cf9609d699
commit
165226bee1
3 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,3 @@
|
|||
import 'dart:typed_data';
|
||||
|
||||
import 'package:intl/locale.dart';
|
||||
|
||||
abstract class FileMatcher {
|
||||
|
|
|
@ -83,7 +83,11 @@ class PassFile {
|
|||
}) {
|
||||
final files = _folder.map((e) => e.name).toList();
|
||||
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;
|
||||
final file = _folder.singleWhere((element) => element.name == path);
|
||||
final content = file.rawContent?.toUint8List() ?? file.content as Uint8List;
|
||||
|
|
|
@ -109,7 +109,11 @@ void main() {
|
|||
extension: 'png',
|
||||
);
|
||||
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');
|
||||
});
|
||||
test('matchScale biggest neighbor', () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue