I am trying to archive and build the flutter IOS project, so that in the end I generate the IPA, but am struggling because of this error, I tried to follow existing questions about the similar issue I couldn't get it :
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class PictureStream with DiagnosticableMixin {
^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
abstract class PictureStreamCompleter with DiagnosticableMixin {
^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
super.debugFillProperties(properties);
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
- 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart').
Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'.
ifPresent: _completer?.toStringShort(),
^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'.
super.debugFillProperties(description);
^^^^^^^^^^^^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
What could be the cause of this issue ?
My case was like this, I used websafe_svg 1.1.0 which depends on flutter_svg ^0.17.4. and as suggested by @Lutaaya Huzaifah Idris this issue is fixed in latest update of flutter_svg: ^0.18.0
.
So if you using websafe_svg
then add below lines to solve this issue in pubspec.yaml
,
dependency_overrides:
flutter_svg: ^0.18.0
What I did was to downgrade my flutter_svg package to flutter_svg: ^0.17.4
, and the build passed.
I think for the case of flutter, when this error occurs it's most probably an issue on your packages. First run flutter pub get
to see if it works, or try flutter clean
. If all packages are working well, then your build in IOS will pass.
I've got the same issue, I just downgrade my flutter version works for me.
Get the latest tag version of the flutter from (https://github.com/flutter/flutter), Clickhere to see attached image
go to you flutter directory and run
git checkout v1.16.3
Once completes, go to your VS terminal and run flutter doctor. Let it complete. Restart your VS (editor). You can build it now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With