Browse Source

do something useful in the example.

null-safety
Herbert Poul 4 years ago
parent
commit
a9a65adfb5
  1. 11
      example/kdbx_example.dart

11
example/kdbx_example.dart

@ -1,5 +1,14 @@
import 'package:kdbx/kdbx.dart'; import 'package:kdbx/kdbx.dart';
void main() { 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();
} }

Loading…
Cancel
Save