save method
Save or update a template.
Implementation
@override
Future<void> save(FaceTemplate template) async {
final json = jsonEncode(template.toJson());
await _storage.write(key: _templateKey(template.id), value: json);
final index = await _readIndex();
if (index.add(template.id)) {
await _writeIndex(index);
}
}