authpass / kdbx.dart

KeepassX format implementation in pure dart.
GNU General Public License v3.0
38 stars 11 forks source link

Fix compilation casting #5

Open matitalatina opened 1 year ago

matitalatina commented 1 year ago

First of all, thanks for the library!

I'm using Dart SDK version: 2.19.3 (stable) (Tue Feb 28 15:52:19 2023 +0000) on "macos_arm64"

Without it, I'm getting the following errors.

I'm using Apple M1 (arm64).

lib/src/kdbx_var_dictionary.dart:56:42: Error: The argument type 'Object?' can't be assigned to the parameter type 'Uint8List'.
   - 'Object' is from 'dart:core'.
   - 'Uint8List' is from 'dart:typed_data'.
      (writer, value) => writer.writeBytes(value, writer._lengthWriter()),
                                           ^
  lib/src/kdbx_var_dictionary.dart:26:43: Error: The argument type 'Object?' can't be assigned to the parameter type 'int'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeUint32(value, writer._lengthWriter()),
                                            ^
  lib/src/kdbx_var_dictionary.dart:31:43: Error: The argument type 'Object?' can't be assigned to the parameter type 'int'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeUint64(value, writer._lengthWriter()),
                                            ^
  lib/src/kdbx_var_dictionary.dart:46:42: Error: The argument type 'Object?' can't be assigned to the parameter type 'int'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeInt64(value, writer._lengthWriter()),
                                           ^
  lib/src/kdbx_var_dictionary.dart:36:42: Error: A value of type 'Object?' can't be assigned to a variable of type 'bool'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeUint8(value ? 1 : 0, writer._lengthWriter()),
                                           ^
  lib/src/kdbx_var_dictionary.dart:41:42: Error: The argument type 'Object?' can't be assigned to the parameter type 'int'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeInt32(value, writer._lengthWriter()),
                                           ^
  lib/src/kdbx_var_dictionary.dart:51:43: Error: The argument type 'Object?' can't be assigned to the parameter type 'String'.
   - 'Object' is from 'dart:core'.
      (writer, value) => writer.writeString(value, writer._lengthWriter()),
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.