readTag method Null safety

  1. @override
NbtDouble readTag(
  1. NbtReader nbtReader,
  2. {bool withName = true}

Reads a NbtTag from fileReader. If the parent is a NbtList or NbtArray, withName should be set to false to avoid reading the name of this Tag.


NbtDouble readTag(NbtReader nbtReader, {bool withName = true}) {
  final name = withName ? nbtReader.readString() : 'None';
  final value = nbtReader.readDouble();
  return this = name
    .._value = value;