Skip to content

Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'. - 'DiagnosticsNode' is from #31962

Closed

Description

@calvinmuller

After upgrading to 1.5.9-pre.108 I seem to be getting this issue with 3 packages I use, should I take this up with the packages or is it something that you guys will fix?

Pacakges affected in my project:

multi_image_picker: ^4.2.0
flutter_sticky_header: ^0.3.4
cached_network_image: ^0.7.0

Steps to Reproduce

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Page1(),
    );
  }
}

class Page1 extends StatelessWidget {
  final String title;

  const Page1({Key key, this.title = "Page 1"}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        body: CustomScrollView(
          slivers: <Widget>[
            SliverStickyHeader(
              header: Text('Users'),
              sliver: SliverList(
                delegate: SliverChildBuilderDelegate(
                  (context, i) => Text(i.toString()),
                ),
              ),
            ),
          ],
        ));
  }
}

Added pubspec dependency

  flutter_sticky_header: ^0.3.4

attempt to build the project.

Logs

Compiler message:
file:///Users/calvinmuller/.pub-cache/hosted/pub.dartlang.org/flutter_sticky_header-0.3.4/lib/src/widgets/sticky_header_layout_builder.dart:147:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/calvinmuller/iStreet/Mobile/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: context);
               ^
Compiler failed on /Users/calvinmuller/iStreet/Mobile/testwhite/lib/main.dart
Error launching application on iPhone X.

Compiler message:
file:///Users/calvinmuller/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/calvinmuller/iStreet/Mobile/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {
                              ^
file:///Users/calvinmuller/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.2.0/lib/src/asset_thumb_provider.dart:35:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/calvinmuller/iStreet/Mobile/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {

[✓] Flutter (Channel master, v1.5.9-pre.108, on Mac OS X 10.14.4 18E226, locale en-ZA)
    • Flutter version 1.5.9-pre.108 at /Users/calvinmuller/iStreet/Mobile/flutter
    • Framework revision 15f187fce0 (89 minutes ago), 2019-05-01 20:39:37 -0700
    • Engine revision ce9e9ba7e4
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 b6997deb3e)


Activity

  1. Zazo032 commented on May 2, 2019

    @Zazo032
    Contributor

    This might be related to Dart 2.3.0 version bump, here you can find a temporary workaround for cached_network_image (should also work for the other 2 packages): Baseflow/flutter_cached_network_image#171 (comment)

  2. calvinmuller commented on May 2, 2019

    @calvinmuller
    Author

    it feels sooo wrong - but for now it will have to do, given i've been building against master its way to difficult to go back now!

    Thanks!

  3. vijayawoshe commented on May 2, 2019

    @vijayawoshe

    For me 4 to 5 Plugins are failing
    1.sentry
    2. flutter_advanced_networkimage
    3.cached_network_image_provider
    4. fllushbar
    5. flutter_svg etc

    with the same errors.

    Compiler message:
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
              informationCollector: (StringBuffer information) {
                                    ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_provider.dart:432:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer information) {
                                  ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_provider.dart:495:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer information) {
                                  ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_provider.dart:559:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer information) {
                                  ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networksvg.dart:106:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
          informationCollector: (StringBuffer information) {
                                ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.0/lib/flare.dart:1023:18: Error: The argument type 'Int32List' can't be assigned to the parameter type 'Uint16List'.
     - 'Int32List' is from 'dart:typed_data'.
     - 'Uint16List' is from 'dart:typed_data'.
    Try changing the type of the parameter, or casting the argument to 'Uint16List'.
            indices: _indices, textureCoordinates: _uvBuffer);
                     ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_stream.dart:252:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
          context: context,
                   ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_stream.dart:297:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
            context: 'resolving a single-frame picture stream',
                     ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/svg/parser_state.dart:395:35: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
                informationCollector: (StringBuffer buff) {
                                      ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/svg/parser_state.dart:404:22: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
                context: 'in _Element.clipPath',
                         ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/svg/parser_state.dart:777:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer buff) {
                                  ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/svg/parser_state.dart:788:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
            context: 'in parseSvgElement',
                     ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/utilities/errors.dart:8:32: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
          context: 'in $methodName',
                                   ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/utilities/errors.dart:10:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
          informationCollector: (StringBuffer buff) {
                                ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flushbar-1.3.0/lib/flushbar.dart:528:15: Error: The method 'detach' isn't defined for the class 'FocusScopeNode'.
     - 'FocusScopeNode' is from 'package:flutter/src/widgets/focus_manager.dart' ('file:///C:/flutter/packages/flutter/lib/src/widgets/focus_manager.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'detach'.
        focusNode.detach();
                  ^^^^^^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sticky_header-0.3.4/lib/src/widgets/sticky_header_layout_builder.dart:147:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
          context: context);
                   ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networkimage.dart:149:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
          informationCollector: (StringBuffer information) {
                                ^
    file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
     - 'StringBuffer' is from 'dart:core'.
     - 'Iterable' is from 'dart:core'.
     - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer information) {
                                  ^
    Compiler failed on C:\Vijay\Workspace\Awoshe\development\Awoshe-Flutter\lib\main.dart
    Finished with error: Gradle task assembleDebug failed with exit code 1
    
    

    This issue has to be solved asap.

    Thanks

  4. thanhhuan1990 commented on May 2, 2019

    @thanhhuan1990

    I have gotting the same errors with 2 libs with same issue.

    1. flutter_svg
    2. flutter_image
    [✓] Flutter (Channel master, v1.5.9-pre.114, on Mac OS X 10.14.4 18E226, locale en-US)
        • Flutter version 1.5.9-pre.114 at /Users/apple/Development/flutter
        • Framework revision f48cc4611a (19 minutes ago), 2019-05-02 08:02:11 -0700
        • Engine revision bc3bd709c7
        • Dart version 2.3.0 (build 2.3.0-dev.0.5 b6997deb3e)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at /Users/apple/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-28, build-tools 28.0.3
        • ANDROID_HOME = /Users/apple/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
        • All Android licenses accepted.
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 10.2.1, Build version 10E1001
        • ios-deploy 1.9.4
        • CocoaPods version 1.7.0.beta.3
    
    [✓] Android Studio (version 3.4)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 35.0.1
        • Dart plugin version 183.5901
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    
    [✓] VS Code (version 1.33.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 2.25.1
    

    This issue should be solved asap.
    Thanks

  5. mklim commented on May 2, 2019

    @mklim
    Contributor

    The root cause is #30983. The change to context there is breaking. I think it should probably be reverted and relanded in a more gradual migration instead of an in-place breaking change? This also breaks firebase_crashlytics, which passes context over the MethodChannel directly under the asusmption that it's a String.

    flutter/plugins CI is currently red based on this.

    /cc @jacob314 @kroikie

  6. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: firebaseObsolete - Firebase plugins
    c: API breakBackwards-incompatible API changes
    c: crashStack traces logged to the console
    on May 2, 2019
  7. mklim commented on May 3, 2019

    @mklim
    Contributor

    My mistake, the breaking change was intentional. https://groups.google.com/forum/#!topic/flutter-announce/hp1RNIgej38 #27327

    This is unfortunately a difficult breaking change for plugins authors to deal with, since plugins users could be using stable (in which this is a String) or master, in which this is a DiagnosticsNode. Just migrating to the latest version will break users on older versions of Flutter.

    I think plugins authors can work around this without breaking either new or old versions of Flutter for now by type checking and handling the property differently depending on what it is. That's not an ideal fix though.

  8. jacob314 commented on May 3, 2019

    @jacob314
    Contributor

    We can change the type of context from DiagnosticsNode to Object for a few months to allow for a gradual migration.
    Based on analysis of all pub packages this change should break about 13 packages. I am happy to help anyone who needs to migrate their package to migrate it.

  9. jacob314 commented on May 3, 2019

    @jacob314
    Contributor

    flutter_svg has been fixed. Let me know if you are still having issues with it.

  10. 56 remaining items

  11. gondaimgano commented on Jul 24, 2019

    @gondaimgano

    Guys I am completely stuck after upgrading to the 1.7.8+hotfix.3 I have been unable to compile in iOS. I have tried downgrading back to 1.5 but the error is still there. I have tried creating a new project and just once it managed to compile to the simulator. After that its been giving me nightmares. Please please. When is this issue going to be resolved. We are dealing with tight timelines for my clients projects. I am now at an advanced stage of the project. Please I need a resolution to this. This is severe.

  12. samfrank commented on Jul 29, 2019

    @samfrank

    My fix for this was to update the flutter_svg to 0.13.0

  13. CarrieUp commented on Aug 3, 2019

    @CarrieUp

    Same issue for Flutter 1.7.8+hotfix.4
    even I upgrade flutter_image to ^2.0.0 and flutter_image_compress to ^0.4.0

    Compiler message:
    file:///T:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.4.0/lib/flutter_image_compress.dart:188:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.

    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///T:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'image load failed ',
      ^
      file:///T:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.4.0/lib/flutter_image_compress.dart:196:32: Error: No named parameter with the name 'onError'.
      stream.addListener(listener, onError: errorListener);
      ^^^^^^^
      file:///T:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.4.0/lib/flutter_image_compress.dart:198:27: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
    • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///T:/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///T:/flutter/packages/flutter/lib/src/painting/image_stream.dart').
      Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
      stream.removeListener(listener);
      ^
      Compiler terminated unexpectedly.

    FAILURE: Build failed with an exception.

    • Where:
      Script 'T:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 638

    • What went wrong:
      Execution failed for task ':app:compileflutterBuildStagingReleaseArm'.

    Process 'command 'T:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 24s
    Running Gradle task 'assembleStagingRelease'...
    Running Gradle task 'assembleStagingRelease'... Done 25.9s
    Gradle task assembleStagingRelease failed with exit code 1

  14. tvolkert commented on Aug 3, 2019

    @tvolkert
    Contributor

    @CarrieUp have you tried updating your dependency on flutter_image_compress? It looks like it's up to version 0.6.3, and you're using 0.4.0.

  15. CarrieUp commented on Aug 4, 2019

    @CarrieUp

    @CarrieUp have you tried updating your dependency on flutter_image_compress? It looks like it's up to version 0.6.3, and you're using 0.4.0.

    @tvolkert thank you so much, I solve the problem by your suggestion: upgrading dependency on flutter_image_compress version to 0.6.3

  16. kawynsean commented on Aug 10, 2019

    @kawynsean

    Running into the same issue as well. Looks like I just need to update my dependencies. New to this so thanks for any help!

    Compiler message:

    Compiler message:
    file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/config.dart:4:31: Error: Type 'core.Config' not found.
    abstract class Config extends core.Config {
    ^^^^^^^^^^^
    file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:19:14: Error: Type 'core.Config' not found.
    set config(core.Config config) {
    ^^^^^^^^^^^
    file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/svg.dart:158:18: Error: The argument type 'String' can't be assigned to the
    parameter type 'DiagnosticsNode'.

    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'picture failed to precache',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'while resolving a picture',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:432:31: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:495:31: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:559:31: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:256:16: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: context,
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:301:18: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'resolving a single-frame picture stream',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:399:35: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer buff) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:408:22: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'in _Element.clipPath',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:798:31: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer buff) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:809:18: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'in parseSvgElement',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networkimage.dart:149:29: Error: The
      argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networksvg.dart:106:29: Error: The argument
      type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer information) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.3/lib/flare.dart:1028:18: Error: The argument type 'Int32List' can't be assigned to the
      parameter type 'Uint16List'.
    • 'Int32List' is from 'dart:typed_data'.
    • 'Uint16List' is from 'dart:typed_data'.
      Try changing the type of the parameter, or casting the argument to 'Uint16List'.
      indices: _indices, textureCoordinates: _uvBuffer);
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:8:32: Error: The argument type 'String' can't be
      assigned to the parameter type 'DiagnosticsNode'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'in $methodName',
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:10:29: Error: The argument type 'Null
      Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
    • 'StringBuffer' is from 'dart:core'.
    • 'Iterable' is from 'dart:core'.
    • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
      Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
      informationCollector: (StringBuffer buff) {
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/html_widget.dart:39:11: Error: No named parameter with the name
      'wf'.
      wf: wf,
      ^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/html_widget.dart:54:13: Error: Getter not found: 'wf'.
      return (wf ?? extended.WidgetFactory())..config = this;
      ^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/html_widget.dart:54:13: Error: The getter 'wf' isn't defined for
      the class 'HtmlWidget'.
    • 'HtmlWidget' is from 'package:flutter_widget_from_html/src/html_widget.dart'
      ('file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/html_widget.dart').
      Try correcting the name to the name of an existing getter, or defining a getter or field named 'wf'.
      return (wf ?? extended.WidgetFactory())..config = this;
      ^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:19:19: Error: 'Config' isn't a type.
      set config(core.Config config) {
      ^^^^^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:20:11: Error: Superclass has no setter named
      'config'.
      super.config = config;
      ^^^^^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:36:21: Error: The getter 'onTapUrl' isn't
      defined for the class 'Config'.
    • 'Config' is from 'package:flutter_widget_from_html/src/config.dart'
      ('file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/config.dart').
      Try correcting the name to the name of an existing getter, or defining a getter or field named 'onTapUrl'.
      () => _config.onTapUrl != null
      ^^^^^^^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:37:21: Error: The method 'onTapUrl' isn't
      defined for the class 'Config'.
    • 'Config' is from 'package:flutter_widget_from_html/src/config.dart'
      ('file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/config.dart').
      Try correcting the name to the name of an existing method, or defining a method named 'onTapUrl'.
      ? _config.onTapUrl(url)
      ^^^^^^^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/transition_to_image.dart:254:33: Error: The argument type
      'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
    • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
      Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
      _imageStream.removeListener(_updateImage);
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/transition_to_image.dart:303:49: Error: The argument type
      'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
    • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
      Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
      return oldImageStream?.removeListener(_updateImage);
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/transition_to_image.dart:325:38: Error: The argument type
      'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
    • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/kawynfurstoss/code/flutter/packages/flutter/lib/src/painting/image_stream.dart').
      Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
      oldImageStream?.removeListener(_updateImage);
      ^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/transition_to_image.dart:326:46: Error: No named parameter
      with the name 'onError'.
      _imageStream.addListener(_updateImage, onError: _catchBadImage);
      ^^^^^^^
      file:///Users/kawynfurstoss/code/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.2.1+1/lib/src/widget_factory.dart:13:7: Error: The superclass, 'WidgetFactory',
      has no unnamed constructor that takes no arguments.
      class WidgetFactory extends core.WidgetFactory {
      ^
  17. tvolkert commented on Aug 12, 2019

    @tvolkert
    Contributor

    @kawynsean your problem is originating from package:flutter_widget_from_html - I'd start by trying to update your dependency on that package.

  18. christophe-oliveira commented on Sep 26, 2019

    @christophe-oliveira

    My fix for this was to update the flutter_svg to 0.13.0

    Yes.... This was all I needed!
    Thanks @samfrank!

  19. kroikie commented on Oct 13, 2019

    @kroikie

    @calvinmuller

    This issue has been moved to firebase/flutterfire#385. Any further collaboration will be done there.

  20. flutterq commented on May 18, 2021

    @flutterq
  21. github-actions commented on Jul 30, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  22. locked as resolved and limited conversation to collaborators on Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: API breakBackwards-incompatible API changesc: crashStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.p: firebaseObsolete - Firebase pluginsp: firebase_crashlyticsObsolete - The Firebase Crashlytics pluginpackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions