Match first field when importing rather than last

This commit is contained in:
Hillel Coren 2023-05-22 09:50:10 +03:00
parent 2c5422fdd5
commit fe7fdc3dd2
1 changed files with 2 additions and 1 deletions

View File

@ -634,7 +634,8 @@ class __FileMapperState extends State<_FileMapper> {
final spaceCase = possible.replaceAll('_', ' '); final spaceCase = possible.replaceAll('_', ' ');
final translated = localization.lookup(possible); final translated = localization.lookup(possible);
if ([possible, spaceCase, translated].contains(field.toLowerCase())) { if ([possible, spaceCase, translated].contains(field.toLowerCase()) &&
_mapping[entry.key][i] == null) {
_mapping[entry.key][i] = availableField; _mapping[entry.key][i] = availableField;
} }
} }