createKey method

Future<void> createKey({
  1. required String keyPath,
  2. required Map<String, dynamic> valuesByLocale,
  3. String? note,
})

Implementation

Future<void> createKey({
  required String keyPath,
  required Map<String, dynamic> valuesByLocale,
  String? note,
}) async {
  final row = await drafts.createKey(
    keyPath: keyPath,
    valuesByLocale: valuesByLocale,
    note: note,
  );
  selection.openRow(row.keyPath);
  await selection.selectLocale(defaultEditorLocale);
  await activity.showKey(row.keyPath);
}