Skip to content

Some error on builder graphql #5

@Wooody82

Description

@Wooody82

Hi,
I just got error when I tried to test the app, I got these error, any way to fix it. Thanks

const Mutation({
^^^^^^^^
lib/src/screens/settings/settings.dart:88:16: Error: The function expression type 'Widget Function(QueryResult, {Future Function() refetch})' isn't of expected type 'Widget Function(QueryResult, {dynamic Function(FetchMoreOptions) fetchMore, Future Function() refetch})'.

  • 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('../../flutter/packages/flutter/lib/src/widgets/framework.dart').
  • 'QueryResult' is from 'package:graphql/src/core/query_result.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql-3.0.0/lib/src/core/query_result.dart').
  • 'Future' is from 'dart:async'.
  • 'FetchMoreOptions' is from 'package:graphql/src/core/query_options.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql-3.0.0/lib/src/core/query_options.dart').
    Change the type of the function expression or the context in which it is used.
    builder: (res, {refetch}) {
    ^
    lib/src/screens/settings/settings.dart:154:7: Error: No named parameter with the name 'onCompleted'.
    onCompleted: (result) async {
    ^^^^^^^^^^^
    ../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-3.0.0/lib/src/widgets/mutation.dart:21:9: Context: Found this candidate, but the arguments don't match.
    const Mutation({
    ^^^^^^^^
    lib/src/screens/users/users.dart:160:7: Error: No named parameter with the name 'update'.
    update: (Cache cache, QueryResult result) => cache,
    ^^^^^^
    ../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-3.0.0/lib/src/widgets/mutation.dart:21:9: Context: Found this candidate, but the arguments don't match.
    const Mutation({
    ^^^^^^^^
    lib/src/screens/users/users.dart:202:16: Error: The function expression type 'Widget Function(QueryResult, {Future Function() refetch})' isn't of expected type 'Widget Function(QueryResult, {dynamic Function(FetchMoreOptions) fetchMore, Future Function() refetch})'.
  • 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('../../flutter/packages/flutter/lib/src/widgets/framework.dart').
  • 'QueryResult' is from 'package:graphql/src/core/query_result.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql-3.0.0/lib/src/core/query_result.dart').
  • 'Future' is from 'dart:async'.
  • 'FetchMoreOptions' is from 'package:graphql/src/core/query_options.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/graphql-3.0.0/lib/src/core/query_options.dart').
    Change the type of the function expression or the context in which it is used.
    builder: (result, {refetch}) {
    ^
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    build failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions