Skip to content

Recognition failure for 2-characters manufacture brands #7

@huangkaichang

Description

@huangkaichang

Hi. Thanks for the package

I noticed the "wmi" is the first 3 characters of the vin number after normalization.

VIN({required this.number, this.extended = false})
      : wmi = normalize(number).substring(0, 3),
        vds = normalize(number).substring(3, 9),
        vis = normalize(number).substring(9, 17);

But some of the brands' wmi is 2-characters, like Nissan(1N), in manufacturers map.
'1N': 'Nissan',

So the getManufacturer() function will return "Unknown"

String? getManufacturer() {
    if (manufacturers.containsKey(this.wmi)) {
      return manufacturers[this.wmi];
    } else {
      return "Unknown (WMI: ${this.wmi.toUpperCase()})";
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions