allows method

bool allows(
  1. PackageId id
)

Whether id satisfies this dependency.

Specifically, whether id refers to the same package as this and constraint allows id.version.

Implementation

bool allows(PackageId id) =>
    name == id.name &&
    description == id.description.description &&
    constraint.allows(id.version);