2024-02-05 12:40:51 +00:00
|
|
|
import 'package:dart_appwrite/dart_appwrite.dart';
|
|
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
Client client = Client()
|
2024-02-27 08:12:00 +00:00
|
|
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
|
|
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
|
|
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
2024-02-05 12:40:51 +00:00
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
Databases databases = Databases(client);
|
2024-02-05 12:40:51 +00:00
|
|
|
|
2024-02-27 08:12:00 +00:00
|
|
|
AttributeInteger result = await databases.createIntegerAttribute(
|
|
|
|
|
databaseId: '<DATABASE_ID>',
|
|
|
|
|
collectionId: '<COLLECTION_ID>',
|
|
|
|
|
key: '',
|
|
|
|
|
xrequired: false,
|
|
|
|
|
min: 0, // (optional)
|
|
|
|
|
max: 0, // (optional)
|
|
|
|
|
xdefault: 0, // (optional)
|
|
|
|
|
array: false, // (optional)
|
2024-02-21 11:31:50 +00:00
|
|
|
);
|