KdbxEntry.create constructor

KdbxEntry.create(
  1. KdbxFile file,
  2. KdbxGroup parent, {
  3. bool isHistoryEntry = false,
})

Creates a new entry in the given parent group. callers are still responsible for calling parent.addEntry(..)!

FIXME: this makes no sense, we should automatically attach this to the parent.

Implementation

KdbxEntry.create(
  KdbxFile file,
  KdbxGroup parent, {
  this.isHistoryEntry = false,
})  : history = [],
      customData = KdbxCustomData.create(),
      super.create(file.ctx, file, 'Entry', parent) {
  icon.set(KdbxIcon.Key);
}