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(); }