HEy there! i used ID.unique() quite a lot. but suddenly, Flutter doesnt correctly recognize it.
Instead of saving a unique ID, i get te literal ID "unique()"
Why could that be?
flutter: Signature ID: unique()
Print ID
Future<void> uploadSignature(
String name, String fileName, int isCustomer, String documentID) async {
try {
log('Uploading Signature...');
String signatureID = ID.unique();
print('Signature ID: $signatureID');
final fullPath = await _getFullImagePath(fileName);
final file = File(fullPath);
if (await file.exists()) {
await appwriteDatabaseHelper.database.createDocument(
documentId: signatureID,
databaseId: appwriteDatabaseID,
collectionId: appwriteSignatureCollection,
data: {
'signatureID': signatureID,
'name': name,
'isCustomer': isCustomer,
'servicescheincollection': documentID,
},
);
log('Uploaded Signature $signatureID successfully');
log('Uploading Signature to storage...');
try {
await uploadImage(fullPath, signatureID);
} catch (e) {
log('Uploading Signature failed: $e');
}
} else {
log('File not found: $fullPath');
}
} catch (e) {
log('Uploading Signature failed: $e');
}
}
Function
When pressing on the unique Function, it makes sense cause it only says this
``part of appwrite;
/// Helper class to generate ID strings for resources. class ID { ID._();
/// Have Appwrite generate a unique ID for you. static String unique() { return 'unique()'; }
/// Uses [id] as the ID for the resource. static String custom(String id) { return id; } } `` and literally returns unique()...
I looked into a different branch and its working as intended with the same Version of appwrite. WHat could i have made it not work here?
i´ll gladly provide more code...
Recommended threads
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...
- Help
- Failed to generate functions SSL
```appwrite-worker-certificates | Cannot renew domain (functions.domain.com) on attempt no. 9 certificate: Failed to verify domain DNS records. appwrite-worker...