CodeSampleX

Sample

Handle invalid keys in CanonicalizedMap when isValidKey is configured

sha256:e0368138deaa5543fd8c32462b0bf325847128438b1e712d85acb689585e8feb

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Handle invalid keys in CanonicalizedMap when isValidKey is configured HOW
Packages
collection 1.19.1
Environment
dart
Created
2026-08-17T02:04:25Z

Commonly assumed

Assigning a value to an invalid key on a CanonicalizedMap throws an ArgumentError, and putIfAbsent rejects invalid keys identically.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts