HiveType constructor

const HiveType({
  1. required int typeId,
  2. String? adapterName,
})

This parameter can be used to keep track of old fieldIds which must not be reused. The generator will throw an error if a legacy fieldId is used again. If adapterName is not set, it'll be "YourClass" + "Adapter".

Implementation

// final List<int> legacyFieldIds;

/// If [adapterName] is not set, it'll be `"YourClass" + "Adapter"`.
const HiveType({
  required this.typeId,
  this.adapterName,
  //this.legacyFieldIds,
});