code property

  1. @override
String get code
override

Stable machine-readable identifier for this class of failure.

Codes are snake_case, are part of the package's public contract and therefore follow semantic versioning: renaming one is a breaking change. Branch on this rather than on message, which is free to change.

Implementation

@override
String get code => 'unexpected_error';