2

This is my first question I'm posting on stackoverflow so please let me know if I need to include any more information or guidelines. Just got brought on to a project and upgraded my flutter to 1.7.8+hotfix.4. It seems like the project was being ran on a previous version (potentially flutter: ">=1.5.0 <1.5.9") and when I go to run the flutter project I get a compiler message.

From the compilier message it appears the three packages being affected are flutter_advanced_networkimage, flutter_widget_from_html, flutter_svg. The versions I am running of these packages are as follows.

dependencies:

flutter_svg: any

flutter_advanced_networkimage: 0.4.15

flutter_widget_from_html: 0.2.1+1

Thanks in advance!

Here is the Compiler message I'm recieving.

Compiler message:
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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> 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<DiagnosticsNode> Function()'.
      informationCollector: (StringBuffer buff) {
                            ^
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);
flarkmarup
  • 5,129
  • 3
  • 24
  • 25
KawynSean
  • 21
  • 4

0 Answers0