Skip to content

Conversation

@stnguyen90
Copy link
Contributor

@stnguyen90
Copy link
Contributor Author

@lohanidamodar, this is the latest generated SDK, but when I tried to run the analyzer and tests locally, they failed. Did they work for you?

Analyzer:
$ dart analyze 
Analyzing appwrite-sdk-for-dart...     0.9s

  error • test/query_test.dart:22:25 • The argument type 'List<String>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:27:25 • The argument type 'List<int>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:32:25 • The argument type 'List<double>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:37:25 • The argument type 'List<double>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:42:25 • The argument type 'List<bool>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:47:25 • The argument type 'List<String>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:54:54 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:65:57 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:76:57 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:87:62 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:98:60 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:109:65 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:119:61 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:126:40 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:133:43 • Too many positional arguments: 1 expected, but 2 found. Try removing the extra arguments. • extra_positional_arguments
  error • test/query_test.dart:133:64 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:141:49 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:148:53 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:155:53 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:163:52 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:170:42 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:177:43 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:184:48 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:191:47 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:198:34 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/query_test.dart:205:35 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. •
          undefined_method
  error • test/services/account_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/account_test.dart:25:3.
  error • test/services/account_test.dart:262:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:294:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:327:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:348:25 • The argument type 'String' can't be assigned to the parameter type 'AuthenticationFactor'.  • argument_type_not_assignable
  error • test/services/account_test.dart:1063:27 • The argument type 'String' can't be assigned to the parameter type 'OAuthProvider'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/avatars_test.dart:25:3.
  error • test/services/avatars_test.dart:65:23 • The argument type 'String' can't be assigned to the parameter type 'Browser'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:79:23 • The argument type 'String' can't be assigned to the parameter type 'CreditCard'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:107:23 • The argument type 'String' can't be assigned to the parameter type 'Flag'.  • argument_type_not_assignable
  error • test/services/databases_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)').
          • invalid_override
           - The member being overridden at test/services/databases_test.dart:25:3.
  error • test/services/databases_test.dart:669:23 • The argument type 'String' can't be assigned to the parameter type 'RelationshipType'.  • argument_type_not_assignable
  error • test/services/databases_test.dart:981:23 • The argument type 'String' can't be assigned to the parameter type 'IndexType'.  • argument_type_not_assignable
  error • test/services/functions_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)').
          • invalid_override
           - The member being overridden at test/services/functions_test.dart:25:3.
  error • test/services/functions_test.dart:108:26 • The argument type 'String' can't be assigned to the parameter type 'Runtime'.  • argument_type_not_assignable
  error • test/services/graphql_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/graphql_test.dart:25:3.
  error • test/services/health_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/health_test.dart:25:3.
  error • test/services/health_test.dart:260:23 • The argument type 'String' can't be assigned to the parameter type 'Name'.  • argument_type_not_assignable
  error • test/services/locale_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/locale_test.dart:25:3.
  error • test/services/messaging_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)').
          • invalid_override
           - The member being overridden at test/services/messaging_test.dart:25:3.
  error • test/services/storage_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/storage_test.dart:25:3.
  error • test/services/teams_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/teams_test.dart:25:3.
  error • test/services/users_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). •
          invalid_override
           - The member being overridden at test/services/users_test.dart:25:3.
  error • test/services/users_test.dart:589:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/users_test.dart:956:31 • The argument type 'String' can't be assigned to the parameter type 'MessagingProviderType'.  • argument_type_not_assignable
  error • test/src/models/subscriber_test.dart:13:17 • The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'Target'.  • argument_type_not_assignable
warning • test/services/account_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/account_test.dart:180:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:362:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:650:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:973:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:1062:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/avatars_test.dart:3:8 • Unused import: 'package:dart_appwrite/models.dart'. Try removing the import directive. • unused_import
warning • test/services/databases_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/databases_test.dart:147:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:261:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:786:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:801:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:937:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:1019:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:216:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:371:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:385:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:590:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/graphql_test.dart:3:8 • Unused import: 'package:dart_appwrite/models.dart'. Try removing the import directive. • unused_import
warning • test/services/graphql_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/graphql_test.dart:65:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/graphql_test.dart:78:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/health_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/locale_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/messaging_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/messaging_test.dart:269:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:850:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:989:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:1091:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/storage_test.dart:168:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/storage_test.dart:288:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/teams_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/teams_test.dart:150:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/teams_test.dart:272:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/users_test.dart:199:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:422:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:867:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:880:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:1019:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/src/models/preferences_test.dart:13:13 • The value of the local variable 'result' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/src/upload_progress_test.dart:1:8 • Unused import: 'dart:convert'. Try removing the import directive. • unused_import
   info • test/services/account_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/avatars_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/databases_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/functions_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/graphql_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/health_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/locale_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/messaging_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/storage_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/teams_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/users_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/src/input_file_test.dart:9:15 • 'InputFile.new' is deprecated and shouldn't be used. Use `InputFile.fromPath` or `InputFile.fromBytes` instead. Try replacing the use of the deprecated member with the
          replacement. • deprecated_member_use_from_same_package
   info • test/src/input_file_test.dart:20:15 • 'InputFile.new' is deprecated and shouldn't be used. Use `InputFile.fromPath` or `InputFile.fromBytes` instead. Try replacing the use of the deprecated member with
          the replacement. • deprecated_member_use_from_same_package

107 issues found.
Tests:
$ dart test
Building package executable... (3.8s)
Built test:test.
00:00 +0 -1: loading test/query_test.dart [E]                                                                                                                                                                                
  Failed to load "test/query_test.dart":
  test/query_test.dart:133:34: Error: Too many positional arguments: 1 allowed, but 2 found.
  Try removing the extra positional arguments.
      final query = Query.isNotNull('attr', 'keyword1 keyword2').toJson();
                                   ^
  lib/query.dart:67:17: Context: Found this candidate, but the arguments don't match.
    static String isNotNull(String attribute) => Query._('isNotNull', attribute).toString();
                  ^^^^^^^^^
  test/query_test.dart:22:25: Error: The argument type 'List<String>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: ["s"],
                          ^
  test/query_test.dart:27:25: Error: The argument type 'List<int>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1],
                          ^
  test/query_test.dart:32:25: Error: The argument type 'List<double>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1.2],
                          ^
  test/query_test.dart:37:25: Error: The argument type 'List<double>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1.0],
                          ^
  test/query_test.dart:42:25: Error: The argument type 'List<bool>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [false],
                          ^
  test/query_test.dart:47:25: Error: The argument type 'List<String>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: ["a","b","c"],
                          ^
  test/query_test.dart:54:54: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.equal('attr', t.value).toJson();
                                                       ^^^^^^
  test/query_test.dart:65:57: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.notEqual('attr', t.value).toJson();
                                                          ^^^^^^
  test/query_test.dart:76:57: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.lessThan('attr', t.value).toJson();
                                                          ^^^^^^
  test/query_test.dart:87:62: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.lessThanEqual('attr', t.value).toJson();
                                                               ^^^^^^
  test/query_test.dart:98:60: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.greaterThan('attr', t.value).toJson();
                                                             ^^^^^^
  test/query_test.dart:109:65: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.greaterThanEqual('attr', t.value).toJson();
                                                                  ^^^^^^
  test/query_test.dart:119:61: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.search('attr', 'keyword1 keyword2').toJson();
                                                              ^^^^^^
  test/query_test.dart:126:40: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.isNull('attr').toJson();
                                         ^^^^^^
  test/query_test.dart:141:49: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 1, 2).toJson();
                                                  ^^^^^^
  test/query_test.dart:148:53: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 1.0, 2.0).toJson();
                                                      ^^^^^^
  test/query_test.dart:155:53: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 'a', 'z').toJson();
                                                      ^^^^^^
  test/query_test.dart:163:52: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.select(['attr1', 'attr2']).toJson();
                                                     ^^^^^^
  test/query_test.dart:170:42: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.orderAsc('attr').toJson();
                                           ^^^^^^
  test/query_test.dart:177:43: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.orderDesc('attr').toJson();
                                            ^^^^^^
  test/query_test.dart:184:48: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.cursorBefore('custom').toJson();
                                                 ^^^^^^
  test/query_test.dart:191:47: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.cursorAfter('custom').toJson();
                                                ^^^^^^
  test/query_test.dart:198:34: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.limit(1).toJson();
                                   ^^^^^^
  test/query_test.dart:205:35: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.offset(1).toJson();
                                    ^^^^^^

To run this test again: dart test test/query_test.dart -p vm --plain-name 'loading test/query_test.dart'
00:00 +2 -2: loading test/services/teams_test.dart [E]                                                                                                                                                                       
  Failed to load "test/services/teams_test.dart":
  test/services/teams_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: dart test test/services/teams_test.dart -p vm --plain-name 'loading test/services/teams_test.dart'
00:00 +12 -3: loading test/services/locale_test.dart [E]                                                                                                                                                                     
  Failed to load "test/services/locale_test.dart":
  test/services/locale_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: dart test test/services/locale_test.dart -p vm --plain-name 'loading test/services/locale_test.dart'
00:00 +17 -4: loading test/services/functions_test.dart [E]                                                                                                                                                                  
  Failed to load "test/services/functions_test.dart":
  test/services/functions_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/functions_test.dart:108:26: Error: The argument type 'String' can't be assigned to the parameter type 'Runtime'.
   - 'Runtime' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  runtime: 'node-14.5',
                           ^

To run this test again: dart test test/services/functions_test.dart -p vm --plain-name 'loading test/services/functions_test.dart'
00:01 +17 -5: loading test/services/users_test.dart [E]                                                                                                                                                                      
  Failed to load "test/services/users_test.dart":
  test/services/users_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/users_test.dart:589:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/users_test.dart:956:31: Error: The argument type 'String' can't be assigned to the parameter type 'MessagingProviderType'.
   - 'MessagingProviderType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  providerType: 'email',
                                ^

To run this test again: dart test test/services/users_test.dart -p vm --plain-name 'loading test/services/users_test.dart'
00:01 +17 -6: loading test/services/databases_test.dart [E]                                                                                                                                                                  
  Failed to load "test/services/databases_test.dart":
  test/services/databases_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/databases_test.dart:669:23: Error: The argument type 'String' can't be assigned to the parameter type 'RelationshipType'.
   - 'RelationshipType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'oneToOne',
                        ^
  test/services/databases_test.dart:981:23: Error: The argument type 'String' can't be assigned to the parameter type 'IndexType'.
   - 'IndexType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'key',
                        ^

To run this test again: dart test test/services/databases_test.dart -p vm --plain-name 'loading test/services/databases_test.dart'
00:01 +17 -7: loading test/services/graphql_test.dart [E]                                                                                                                                                                    
  Failed to load "test/services/graphql_test.dart":
  test/services/graphql_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: dart test test/services/graphql_test.dart -p vm --plain-name 'loading test/services/graphql_test.dart'
00:01 +17 -8: loading test/services/health_test.dart [E]                                                                                                                                                                     
  Failed to load "test/services/health_test.dart":
  test/services/health_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/health_test.dart:260:23: Error: The argument type 'String' can't be assigned to the parameter type 'Name'.
   - 'Name' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  name: 'v1-database',
                        ^

To run this test again: dart test test/services/health_test.dart -p vm --plain-name 'loading test/services/health_test.dart'
00:01 +17 -9: loading test/services/avatars_test.dart [E]                                                                                                                                                                    
  Failed to load "test/services/avatars_test.dart":
  test/services/avatars_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/avatars_test.dart:65:23: Error: The argument type 'String' can't be assigned to the parameter type 'Browser'.
   - 'Browser' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'aa',
                        ^
  test/services/avatars_test.dart:79:23: Error: The argument type 'String' can't be assigned to the parameter type 'CreditCard'.
   - 'CreditCard' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'amex',
                        ^
  test/services/avatars_test.dart:107:23: Error: The argument type 'String' can't be assigned to the parameter type 'Flag'.
   - 'Flag' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'af',
                        ^

To run this test again: dart test test/services/avatars_test.dart -p vm --plain-name 'loading test/services/avatars_test.dart'
00:01 +17 -10: loading test/services/storage_test.dart [E]                                                                                                                                                                   
  Failed to load "test/services/storage_test.dart":
  test/services/storage_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: dart test test/services/storage_test.dart -p vm --plain-name 'loading test/services/storage_test.dart'
00:01 +17 -11: loading test/services/messaging_test.dart [E]                                                                                                                                                                 
  Failed to load "test/services/messaging_test.dart":
  test/services/messaging_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: dart test test/services/messaging_test.dart -p vm --plain-name 'loading test/services/messaging_test.dart'
00:01 +17 -12: loading test/services/account_test.dart [E]                                                                                                                                                                   
  Failed to load "test/services/account_test.dart":
  test/services/account_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/account_test.dart:262:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:294:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:327:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:348:25: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticationFactor'.
   - 'AuthenticationFactor' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  factor: 'email',
                          ^
  test/services/account_test.dart:1063:27: Error: The argument type 'String' can't be assigned to the parameter type 'OAuthProvider'.
   - 'OAuthProvider' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  provider: 'amazon',
                            ^

To run this test again: dart test test/services/account_test.dart -p vm --plain-name 'loading test/services/account_test.dart'
00:02 +73 -13: loading test/src/models/subscriber_test.dart [E]                                                                                                                                                              
  Failed to load "test/src/models/subscriber_test.dart":
  test/src/models/subscriber_test.dart:13:17: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'Target'.
   - 'Map' is from 'dart:core'.
   - 'Target' is from 'package:dart_appwrite/models.dart' ('lib/models.dart').
          target: {},
                  ^

To run this test again: dart test test/src/models/subscriber_test.dart -p vm --plain-name 'loading test/src/models/subscriber_test.dart'
00:03 +122 -13: Some tests failed.

@stnguyen90
Copy link
Contributor Author

stnguyen90 commented May 20, 2024

@lohanidamodar analyze and tests still fail:

Analyze
$ dart analyze 
Analyzing appwrite-sdk-for-dart...     9.7s

  error • test/query_test.dart:22:25 • The argument type 'List<String>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:27:25 • The argument type 'List<int>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:32:25 • The argument type 'List<double>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:37:25 • The argument type 'List<double>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:42:25 • The argument type 'List<bool>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:47:25 • The argument type 'List<String>' can't be assigned to the parameter type 'String'.  • argument_type_not_assignable
  error • test/query_test.dart:54:54 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:65:57 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:76:57 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:87:62 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:98:60 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:109:65 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:119:61 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:126:40 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:133:43 • Too many positional arguments: 1 expected, but 2 found. Try removing the extra arguments. • extra_positional_arguments
  error • test/query_test.dart:133:64 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:141:49 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:148:53 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:155:53 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:163:52 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:170:42 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:177:43 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:184:48 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:191:47 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:198:34 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/query_test.dart:205:35 • The method 'toJson' isn't defined for the type 'String'. Try correcting the name to the name of an existing method, or defining a method named 'toJson'. • undefined_method
  error • test/services/account_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/account_test.dart:25:3.
  error • test/services/account_test.dart:262:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:294:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:310:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/account_test.dart:329:25 • The argument type 'String' can't be assigned to the parameter type 'AuthenticationFactor'.  • argument_type_not_assignable
  error • test/services/account_test.dart:1052:27 • The argument type 'String' can't be assigned to the parameter type 'OAuthProvider'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/avatars_test.dart:25:3.
  error • test/services/avatars_test.dart:65:23 • The argument type 'String' can't be assigned to the parameter type 'Browser'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:79:23 • The argument type 'String' can't be assigned to the parameter type 'CreditCard'.  • argument_type_not_assignable
  error • test/services/avatars_test.dart:107:23 • The argument type 'String' can't be assigned to the parameter type 'Flag'.  • argument_type_not_assignable
  error • test/services/databases_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/databases_test.dart:25:3.
  error • test/services/databases_test.dart:669:23 • The argument type 'String' can't be assigned to the parameter type 'RelationshipType'.  • argument_type_not_assignable
  error • test/services/databases_test.dart:981:23 • The argument type 'String' can't be assigned to the parameter type 'IndexType'.  • argument_type_not_assignable
  error • test/services/functions_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/functions_test.dart:25:3.
  error • test/services/functions_test.dart:108:26 • The argument type 'String' can't be assigned to the parameter type 'Runtime'.  • argument_type_not_assignable
  error • test/services/graphql_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/graphql_test.dart:25:3.
  error • test/services/health_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/health_test.dart:25:3.
  error • test/services/health_test.dart:260:23 • The argument type 'String' can't be assigned to the parameter type 'Name'.  • argument_type_not_assignable
  error • test/services/locale_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/locale_test.dart:25:3.
  error • test/services/messaging_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/messaging_test.dart:25:3.
  error • test/services/storage_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/storage_test.dart:25:3.
  error • test/services/teams_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/teams_test.dart:25:3.
  error • test/services/users_test.dart:25:10 • 'MockClient.webAuth' ('Future<dynamic> Function(Uri?, {String? callbackUrlScheme})') isn't a valid override of 'Client.webAuth' ('Future<String?> Function(Uri)'). • invalid_override
           - The member being overridden at test/services/users_test.dart:25:3.
  error • test/services/users_test.dart:589:23 • The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.  • argument_type_not_assignable
  error • test/services/users_test.dart:958:31 • The argument type 'String' can't be assigned to the parameter type 'MessagingProviderType'.  • argument_type_not_assignable
  error • test/src/models/subscriber_test.dart:13:17 • The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'Target'.  • argument_type_not_assignable
warning • test/services/account_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/account_test.dart:180:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:309:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:343:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:632:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:962:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/account_test.dart:1051:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/avatars_test.dart:3:8 • Unused import: 'package:dart_appwrite/models.dart'. Try removing the import directive. • unused_import
warning • test/services/databases_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/databases_test.dart:147:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:261:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:786:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:801:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:937:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/databases_test.dart:1019:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:216:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:371:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:385:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/functions_test.dart:590:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/graphql_test.dart:3:8 • Unused import: 'package:dart_appwrite/models.dart'. Try removing the import directive. • unused_import
warning • test/services/graphql_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/graphql_test.dart:65:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/graphql_test.dart:78:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/health_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/locale_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/messaging_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/messaging_test.dart:269:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:850:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:989:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/messaging_test.dart:1091:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/storage_test.dart:168:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/storage_test.dart:288:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/teams_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/teams_test.dart:150:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/teams_test.dart:272:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:6:8 • Unused import: 'dart:typed_data'. Try removing the import directive. • unused_import
warning • test/services/users_test.dart:199:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:422:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:869:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:882:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/services/users_test.dart:1021:19 • The value of the local variable 'response' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/src/models/preferences_test.dart:13:13 • The value of the local variable 'result' isn't used. Try removing the variable or using it. • unused_local_variable
warning • test/src/upload_progress_test.dart:1:8 • Unused import: 'dart:convert'. Try removing the import directive. • unused_import
   info • test/services/account_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/avatars_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/databases_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/functions_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/graphql_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/health_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/locale_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/messaging_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/storage_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/teams_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/services/users_test.dart:5:8 • The import of 'package:dart_appwrite/src/response.dart' is unnecessary because all of the used elements are also provided by the import of 'package:dart_appwrite/dart_appwrite.dart'. Try removing the import directive. • unnecessary_import
   info • test/src/input_file_test.dart:9:15 • 'InputFile.new' is deprecated and shouldn't be used. Use `InputFile.fromPath` or `InputFile.fromBytes` instead. Try replacing the use of the deprecated member with the replacement. • deprecated_member_use_from_same_package
   info • test/src/input_file_test.dart:20:15 • 'InputFile.new' is deprecated and shouldn't be used. Use `InputFile.fromPath` or `InputFile.fromBytes` instead. Try replacing the use of the deprecated member with the replacement. • deprecated_member_use_from_same_package

108 issues found
Test:
$ dart test    
00:00 +0 -1: loading test/query_test.dart [E]                                                                                                                                                                                                                                                                     
  Failed to load "test/query_test.dart":
  test/query_test.dart:133:34: Error: Too many positional arguments: 1 allowed, but 2 found.
  Try removing the extra positional arguments.
      final query = Query.isNotNull('attr', 'keyword1 keyword2').toJson();
                                   ^
  lib/query.dart:67:17: Context: Found this candidate, but the arguments don't match.
    static String isNotNull(String attribute) => Query._('isNotNull', attribute).toString();
                  ^^^^^^^^^
  test/query_test.dart:22:25: Error: The argument type 'List<String>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: ["s"],
                          ^
  test/query_test.dart:27:25: Error: The argument type 'List<int>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1],
                          ^
  test/query_test.dart:32:25: Error: The argument type 'List<double>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1.2],
                          ^
  test/query_test.dart:37:25: Error: The argument type 'List<double>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [1.0],
                          ^
  test/query_test.dart:42:25: Error: The argument type 'List<bool>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: [false],
                          ^
  test/query_test.dart:47:25: Error: The argument type 'List<String>' can't be assigned to the parameter type 'String'.
   - 'List' is from 'dart:core'.
          expectedValues: ["a","b","c"],
                          ^
  test/query_test.dart:54:54: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.equal('attr', t.value).toJson();
                                                       ^^^^^^
  test/query_test.dart:65:57: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.notEqual('attr', t.value).toJson();
                                                          ^^^^^^
  test/query_test.dart:76:57: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.lessThan('attr', t.value).toJson();
                                                          ^^^^^^
  test/query_test.dart:87:62: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.lessThanEqual('attr', t.value).toJson();
                                                               ^^^^^^
  test/query_test.dart:98:60: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.greaterThan('attr', t.value).toJson();
                                                             ^^^^^^
  test/query_test.dart:109:65: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
            final query = Query.greaterThanEqual('attr', t.value).toJson();
                                                                  ^^^^^^
  test/query_test.dart:119:61: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.search('attr', 'keyword1 keyword2').toJson();
                                                              ^^^^^^
  test/query_test.dart:126:40: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.isNull('attr').toJson();
                                         ^^^^^^
  test/query_test.dart:141:49: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 1, 2).toJson();
                                                  ^^^^^^
  test/query_test.dart:148:53: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 1.0, 2.0).toJson();
                                                      ^^^^^^
  test/query_test.dart:155:53: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
        final query = Query.between('attr', 'a', 'z').toJson();
                                                      ^^^^^^
  test/query_test.dart:163:52: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.select(['attr1', 'attr2']).toJson();
                                                     ^^^^^^
  test/query_test.dart:170:42: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.orderAsc('attr').toJson();
                                           ^^^^^^
  test/query_test.dart:177:43: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.orderDesc('attr').toJson();
                                            ^^^^^^
  test/query_test.dart:184:48: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.cursorBefore('custom').toJson();
                                                 ^^^^^^
  test/query_test.dart:191:47: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.cursorAfter('custom').toJson();
                                                ^^^^^^
  test/query_test.dart:198:34: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.limit(1).toJson();
                                   ^^^^^^
  test/query_test.dart:205:35: Error: The method 'toJson' isn't defined for the class 'String'.
  Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
      final query = Query.offset(1).toJson();
                                    ^^^^^^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/query_test.dart -p vm --plain-name 'loading test/query_test.dart'
00:00 +2 -2: loading test/services/teams_test.dart [E]                                                                                                                                                                                                                                                            
  Failed to load "test/services/teams_test.dart":
  test/services/teams_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/teams_test.dart -p vm --plain-name 'loading test/services/teams_test.dart'
00:00 +2 -3: loading test/services/locale_test.dart [E]                                                                                                                                                                                                                                                           
  Failed to load "test/services/locale_test.dart":
  test/services/locale_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/locale_test.dart -p vm --plain-name 'loading test/services/locale_test.dart'
00:00 +12 -4: loading test/services/functions_test.dart [E]                                                                                                                                                                                                                                                       
  Failed to load "test/services/functions_test.dart":
  test/services/functions_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/functions_test.dart:108:26: Error: The argument type 'String' can't be assigned to the parameter type 'Runtime'.
   - 'Runtime' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  runtime: 'node-14.5',
                           ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/functions_test.dart -p vm --plain-name 'loading test/services/functions_test.dart'
00:00 +12 -5: loading test/services/users_test.dart [E]                                                                                                                                                                                                                                                           
  Failed to load "test/services/users_test.dart":
  test/services/users_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/users_test.dart:589:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/users_test.dart:958:31: Error: The argument type 'String' can't be assigned to the parameter type 'MessagingProviderType'.
   - 'MessagingProviderType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  providerType: 'email',
                                ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/users_test.dart -p vm --plain-name 'loading test/services/users_test.dart'
00:00 +17 -6: loading test/services/databases_test.dart [E]                                                                                                                                                                                                                                                       
  Failed to load "test/services/databases_test.dart":
  test/services/databases_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/databases_test.dart:669:23: Error: The argument type 'String' can't be assigned to the parameter type 'RelationshipType'.
   - 'RelationshipType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'oneToOne',
                        ^
  test/services/databases_test.dart:981:23: Error: The argument type 'String' can't be assigned to the parameter type 'IndexType'.
   - 'IndexType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'key',
                        ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/databases_test.dart -p vm --plain-name 'loading test/services/databases_test.dart'
00:00 +17 -7: loading test/services/graphql_test.dart [E]                                                                                                                                                                                                                                                         
  Failed to load "test/services/graphql_test.dart":
  test/services/graphql_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/graphql_test.dart -p vm --plain-name 'loading test/services/graphql_test.dart'
00:00 +17 -8: loading test/services/health_test.dart [E]                                                                                                                                                                                                                                                          
  Failed to load "test/services/health_test.dart":
  test/services/health_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/health_test.dart:260:23: Error: The argument type 'String' can't be assigned to the parameter type 'Name'.
   - 'Name' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  name: 'v1-database',
                        ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/health_test.dart -p vm --plain-name 'loading test/services/health_test.dart'
00:00 +17 -9: loading test/services/avatars_test.dart [E]                                                                                                                                                                                                                                                         
  Failed to load "test/services/avatars_test.dart":
  test/services/avatars_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/avatars_test.dart:65:23: Error: The argument type 'String' can't be assigned to the parameter type 'Browser'.
   - 'Browser' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'aa',
                        ^
  test/services/avatars_test.dart:79:23: Error: The argument type 'String' can't be assigned to the parameter type 'CreditCard'.
   - 'CreditCard' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'amex',
                        ^
  test/services/avatars_test.dart:107:23: Error: The argument type 'String' can't be assigned to the parameter type 'Flag'.
   - 'Flag' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  code: 'af',
                        ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/avatars_test.dart -p vm --plain-name 'loading test/services/avatars_test.dart'
00:00 +17 -10: loading test/services/storage_test.dart [E]                                                                                                                                                                                                                                                        
  Failed to load "test/services/storage_test.dart":
  test/services/storage_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/storage_test.dart -p vm --plain-name 'loading test/services/storage_test.dart'
00:00 +17 -11: loading test/services/messaging_test.dart [E]                                                                                                                                                                                                                                                      
  Failed to load "test/services/messaging_test.dart":
  test/services/messaging_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/messaging_test.dart -p vm --plain-name 'loading test/services/messaging_test.dart'
00:00 +17 -12: loading test/services/account_test.dart [E]                                                                                                                                                                                                                                                        
  Failed to load "test/services/account_test.dart":
  test/services/account_test.dart:25:10: Error: The return type of the method 'MockClient.webAuth' is 'Future<dynamic>', which does not match the return type, 'Future<String?>', of the overridden method, 'Client.webAuth'.
   - 'Future' is from 'dart:async'.
  Change to a subtype of 'Future<String?>'.
    Future webAuth(
           ^
  lib/src/client.dart:27:19: Context: This is the overridden method ('webAuth').
    Future<String?> webAuth(Uri url);
                    ^
  test/services/account_test.dart:262:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:294:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:310:23: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticatorType'.
   - 'AuthenticatorType' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  type: 'totp',
                        ^
  test/services/account_test.dart:329:25: Error: The argument type 'String' can't be assigned to the parameter type 'AuthenticationFactor'.
   - 'AuthenticationFactor' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  factor: 'email',
                          ^
  test/services/account_test.dart:1052:27: Error: The argument type 'String' can't be assigned to the parameter type 'OAuthProvider'.
   - 'OAuthProvider' is from 'package:dart_appwrite/enums.dart' ('lib/enums.dart').
                  provider: 'amazon',
                            ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/services/account_test.dart -p vm --plain-name 'loading test/services/account_test.dart'
00:02 +72 -13: loading test/src/models/subscriber_test.dart [E]                                                                                                                                                                                                                                                   
  Failed to load "test/src/models/subscriber_test.dart":
  test/src/models/subscriber_test.dart:13:17: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'Target'.
   - 'Map' is from 'dart:core'.
   - 'Target' is from 'package:dart_appwrite/models.dart' ('lib/models.dart').
          target: {},
                  ^

To run this test again: /Users/steven/development/flutter/bin/cache/dart-sdk/bin/dart test test/src/models/subscriber_test.dart -p vm --plain-name 'loading test/src/models/subscriber_test.dart'
00:03 +122 -13: Some tests failed.

@stnguyen90 stnguyen90 marked this pull request as ready for review May 23, 2024 18:16
@stnguyen90 stnguyen90 merged commit f34da98 into main May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants