CredentialSchema class

Represents a Credential Schema for verifiable credentials following W3C standards.

A credential schema defines the structure and constraints of a verifiable credential. It uses JSON Schema format to validate credential data.

Example:

final schema = CredentialSchema(
  id: Uri.parse('https://example.com/schemas'),
  type: 'JsonSchemaValidator2018',
);

Constructors

CredentialSchema({required Uri id, required String type})
Creates a MutableCredentialSchema
CredentialSchema.fromJson(Map<String, dynamic> json)
Creates a CredentialSchema from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id Uri
The URL of the schema including domain and filename.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The schema type of validator used.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this status to a JSON-serializable map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited