After upgrading Dart to 2.3, I'm starting to get this error:

file:///Users/user1/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-0.9.5/lib/src/widgets/subscription.dart:13:3: Error: Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.
Try replacing the keyword with a return type.
  final dynamic error,
  ^^^^^

in this code:

typedef SubscriptionBuilder = Widget Function({
  final bool loading,
  final dynamic payload,
  final dynamic error,
});

How do I fix it? I can't find any documentation around this on the internet. Thanks.

0 Answers