generated from josiadmin/flutter-template-getx-provider
appwrite repo mod
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/models.dart' as models;
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
@@ -8,11 +6,9 @@ class AppWriteProvider {
|
||||
final szEndpoint = dotenv.env['APPWRITE_ENDPOINT_URL'] ?? '';
|
||||
final szProjectID = dotenv.env['APPWRITE_PROJECT_ID'] ?? '';
|
||||
final szDatabaseID = dotenv.env['APPWRITE_DATABASE_ID'] ?? '';
|
||||
final szCollectionID = dotenv.env['APPWRITE_COLLECTION_ID'] ?? '';
|
||||
final szCollectionID = dotenv.env['APPWRITE_COLLECTION_ID'] ?? '';
|
||||
final bSelfSignd = dotenv.env['APPWRITE_SELF_SIGNED'] == 'true';
|
||||
|
||||
|
||||
|
||||
Client client = Client();
|
||||
Account? account;
|
||||
Storage? storage;
|
||||
@@ -119,12 +115,11 @@ class AppWriteProvider {
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<models.DocumentList> listTankStops(String userId) async {
|
||||
Future<models.DocumentList> listTankStops(String userId, String szDate) async {
|
||||
final response = await database!.listDocuments(
|
||||
databaseId: szDatabaseID,
|
||||
collectionId: szCollectionID,
|
||||
queries: [Query.equal('userId', userId)],
|
||||
);
|
||||
queries: [Query.equal('userId', userId), Query.greaterThanEqual('date', szDate)]);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user