metadata method

Future<Uint8List?> metadata(
  1. String name, {
  2. Caller? caller,
})

The content of the canister's custom-section called icp:public [name] or icp:private [name].

If the custom-section is in the icp:private [name] namespace, the Caller must be one of this Canister's controllers.

internetcomputer.org/docs/current/references/ic-interface-spec/#state-tree-canister-information

Implementation

Future<Uint8List?> metadata(String name, {Caller? caller}) async {
    List<Uint8List?> paths_values = await _state(paths: [pathbytes(['canister', this.principal.bytes, 'metadata', name])], caller:caller);
    return paths_values[0];
}