From a9a65adfb53baa1bdc01e7f4ec2d4878a8b69031 Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Sat, 22 May 2021 12:34:03 +0200 Subject: [PATCH] do something useful in the example. --- example/kdbx_example.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/example/kdbx_example.dart b/example/kdbx_example.dart index d4902e5..3dff3bd 100644 --- a/example/kdbx_example.dart +++ b/example/kdbx_example.dart @@ -1,5 +1,14 @@ import 'package:kdbx/kdbx.dart'; void main() { - KdbxFormat().read(null, null); + final kdbx = KdbxFormat() + .create(Credentials(ProtectedValue.fromString('Lorem Ipsum')), 'Example'); + + final group = kdbx.body.rootGroup; + final entry = KdbxEntry.create(kdbx, group); + group.addEntry(entry); + entry.setString(KdbxKeyCommon.USER_NAME, PlainValue('example user')); + entry.setString( + KdbxKeyCommon.PASSWORD, ProtectedValue.fromString('password')); + kdbx.save(); }