Beispiel
Demonstrate that EquatableConfig.stringify defaults to true in debug mode (assertions enabled) in v2.0.0, enabling property stringification by default.
sha256:06a1477df6b12e3b1f576c70f050420128cd4aa9fd36e51bc1c81e36172685ef
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Demonstrate that EquatableConfig.stringify defaults to true in debug mode (assertions enabled) in v2.0.0, enabling property stringification by default. HOW
- Pakete
- equatable 2.0.0
- Umgebung
- dart
- Erstellt
- 2026-08-17T02:09:11Z
Häufige Annahme
An Equatable object's toString method only outputs its properties if stringify is locally overridden to true or if EquatableConfig.stringify is explicitly enabled.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- By default in debug mode (assertions enabled), printing an Equatable instance that does not override stringify prints its property values because EquatableConfig.stringify defaults to true.
- assert(AutoStringify(42).toString() == 'AutoStringify(42)');
Dateien
- NOTES.md
- csx.json
- pubspec.lock
- pubspec.yaml
- test/contract.dart
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- dart 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9