Storage.copyData constructor

Storage.copyData(
  1. String name, {
  2. bool autoNamespace = true,
  3. required String? key,
  4. required Data data,
})

Copies Nbt Data from a Data.get Widget.

Implementation

Storage.copyData(
  this.name, {
  this.autoNamespace = true,
  required this.key,
  required Data data,
})  : assert(key != null),
      assert(data.subcommand == 'get',
          'You have to insert a Data.get into copyData!'),
      // ignore: prefer_initializing_formals
      data = data,
      _type = _StorageType.data;