updateKeyPairMetaData method

Map updateKeyPairMetaData(
  1. Map acc,
  2. String? name
)

Implementation

Map updateKeyPairMetaData(Map acc, String? name) {
  acc['name'] = name;
  acc['meta']['name'] = name;
  if (acc['meta']['whenCreated'] == null) {
    acc['meta']['whenCreated'] = DateTime.now().millisecondsSinceEpoch;
  }
  acc['meta']['whenEdited'] = DateTime.now().millisecondsSinceEpoch;
  return acc;
}