Ошибка флаттера / дротика: тип аргумента «Нулевая функция (ключ)» не может быть назначен типу параметра «пустая функция (объект)» - PullRequest
1 голос
/ 29 января 2020

Android Studio: Запуск lib / main.dart на iPhone 11 Pro Max в режиме отладки ...

Compiler message:
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_flex.dart:727:18: Error: The argument type 'Null Function(Key)' can't be assigned to the parameter type 'void Function(Object)'.
 - 'Key' is from 'package:flutter/src/foundation/key.dart' ('/Users/[User]/Development/flutter/packages/flutter/lib/src/foundation/key.dart').
 - 'Object' is from 'dart:core'.
        onLeave: (Key leaving) {},
                 ^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_wrap.dart:951:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
 - 'Object' is from 'dart:core'.
        onLeave: (int leaving) {},
                 ^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_wrap.dart:957:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
 - 'Object' is from 'dart:core'.
        onLeave: (int leaving) {},
                 ^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_sliver.dart:842:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
 - 'Object' is from 'dart:core'.
        onLeave: (int leaving) {},
                 ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
Error launching application on iPhone 11 Pro Max.

Не удается получить ответ, чтобы пройти через эту проблему, любая помощь будет с благодарностью ☃

1 Ответ

0 голосов
/ 02 февраля 2020

Ответ Simon Binder через dart-lang / TALK-general:

Это ошибка в пакете reorderables, от которой вы, вероятно, зависите. Отчет и решение можно найти здесь: hanshengchiu / reorderables # 52

Изменение в pubspe c .yaml :

#  reorderables: ^0.2.12
  reorderables:
    git:
      url: git://github.com/hanshengchiu/reorderables.git
...