From 5c00d134c34095ed61cbd0c3337dfc9338ec7246 Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Wed, 5 Feb 2020 16:13:08 +0100 Subject: [PATCH] fix generator default value. --- lib/src/kdbx_format.dart | 8 ++++++-- lib/src/kdbx_meta.dart | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/src/kdbx_format.dart b/lib/src/kdbx_format.dart index 4129447..2814895 100644 --- a/lib/src/kdbx_format.dart +++ b/lib/src/kdbx_format.dart @@ -278,11 +278,15 @@ class KdbxBody extends KdbxNode { } class KdbxFormat { - static KdbxFile create(Credentials credentials, String name) { + static KdbxFile create( + Credentials credentials, + String name, { + String generator, + }) { final header = KdbxHeader.create(); final meta = KdbxMeta.create( databaseName: name, - generator: 'AuthPass', + generator: generator, ); final rootGroup = KdbxGroup.create(parent: null, name: name); final body = KdbxBody.create(meta, rootGroup); diff --git a/lib/src/kdbx_meta.dart b/lib/src/kdbx_meta.dart index 42661e2..d51a6ce 100644 --- a/lib/src/kdbx_meta.dart +++ b/lib/src/kdbx_meta.dart @@ -8,11 +8,11 @@ import 'package:xml/xml.dart' as xml; class KdbxMeta extends KdbxNode { KdbxMeta.create({ @required String databaseName, - String generator = 'kdbx.dart', + String generator, }) : customData = KdbxCustomData.create(), super.create('Meta') { this.databaseName.set(databaseName); - this.generator.set(generator); + this.generator.set(generator ?? 'kdbx.dart'); } KdbxMeta.read(xml.XmlElement node)