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
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...