mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
fix: boolean handling in requests
This commit is contained in:
@@ -6,4 +6,6 @@ Client client = Client()
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
Jwt result = await account.createJWT();
|
||||
Jwt result = await account.createJWT(
|
||||
duration: 0, // optional
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ Uint8List bytes = await avatars.getScreenshot(
|
||||
width: 800, // optional
|
||||
height: 600, // optional
|
||||
quality: 85, // optional
|
||||
output: Output.jpg, // optional
|
||||
output: ImageFormat.jpg, // optional
|
||||
)
|
||||
|
||||
final file = File('path_to_file/filename.ext');
|
||||
@@ -61,7 +61,7 @@ FutureBuilder(
|
||||
width:800 , // optional
|
||||
height:600 , // optional
|
||||
quality:85 , // optional
|
||||
output: Output.jpg, // optional
|
||||
output: ImageFormat.jpg, // optional
|
||||
), // Works for both public file and private file, for private files you need to be logged in
|
||||
builder: (context, snapshot) {
|
||||
return snapshot.hasData && snapshot.data != null
|
||||
|
||||
@@ -12,7 +12,13 @@ Document result = await databases.updateDocument(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
||||
@@ -12,7 +12,13 @@ Document result = await databases.upsertDocument(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
||||
@@ -12,7 +12,13 @@ Row result = await tablesDB.updateRow(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
||||
@@ -12,7 +12,13 @@ Row result = await tablesDB.upsertRow(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user