Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try correcting the name to the name of an existing method, or defining a method named 'handleSystemMessage'. PaintingBinding.instance.handleSystemMessage({'type': 'fontsChange'}); #6

Closed
newtonmunene99 opened this issue Dec 11, 2019 · 19 comments

Comments

@newtonmunene99
Copy link

Compiler message:
../../../flutter/.pub-cache/hosted/pub.dartlang.org/google_fonts-0.1.1/lib/src/google_fonts_base.dart:105:28: Error: The method 'handleSystemMessage' isn't defined for the class 'PaintingBinding'.

  • 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('../../../flutter/packages/flutter/lib/src/painting/binding.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'handleSystemMessage'.
    PaintingBinding.instance.handleSystemMessage({'type': 'fontsChange'});
    ^^^^^^^^^^^^^^^^^^^
    Compiler failed on /home/munene/Projects/Flutter/echo/lib/main.dart
@codediodeio
Copy link

Also ran into this issue, running flutter upgrade fixed it.

@newtonmunene99
Copy link
Author

@codediodeio what version of flutter are you running after flutter upgrade? It didn't work for me

@RafaelR7
Copy link

RafaelR7 commented Dec 11, 2019

I´m having the same problem, my flutter version is STABLE v1.9.1+hotfix.6, I will change to the beta that way ahead, it is on v1.12.13+hotfix.5, and see if the error still persists

@codediodeio
Copy link

I'm testing on Flutter 1.12.13+hotfix.5, works on iOS/Android.

@RafaelR7
Copy link

the stable version was upgraded to v1.12.13+hotfix.5 today, I just upgrade my version everything is working now.

@newtonmunene99
Copy link
Author

It's resolved after upgrading

@Sarps
Copy link

Sarps commented Mar 5, 2020

flutter upgrade worked for me too. Thanks @codediodeio

@AlvaroStudy
Copy link

I just ran flutter upgrade and all the working projects currently stopped working

@TEJESH5210
Copy link

the stable version was upgraded to v1.12.13+hotfix.5 today, I just upgrade my version everything is working now.

how to upgrade can u tell me

@TulioPintoNeto
Copy link

the stable version was upgraded to v1.12.13+hotfix.5 today, I just upgrade my version everything is working now.

how to upgrade can u tell me

Just enter the command "flutter upgrade" in your terminal console (check if you're in your correct folder application to do that)

@anantraj2808
Copy link

  1. Run "flutter pub outdated". This will tell you all the outdated packages your project is using.
  2. Then run "flutter pub upgrade --major-versions". This will upgrade all the outdated version.
    This helped me.

@Deep052697
Copy link

Flutter Upgrade doesn't work, anyone have a different solution?

@Deep052697
Copy link

../.pub-cache/hosted/pub.dartlang.org/audio_service-0.17.1/lib/audio_service.dart:675:16: Error: The method 'setMockMethodCallHandler' isn't defined for the class 'MethodChannel'.
- 'MethodChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../Development/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMethodCallHandler'.
.setMockMethodCallHandler(handler);
^^^^^^^^^^^^^^^^^^^^^^^^
../.pub-cache/hosted/pub.dartlang.org/audio_service-0.17.1/lib/audio_service.dart:1266:68: Error: The method 'setMockMethodCallHandler' isn't defined for the class 'MethodChannel'.
- 'MethodChannel' is from 'package:flutter/src/services/platform_channel.dart' ('../Development/flutter/packages/flutter/lib/src/services/platform_channel.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMethodCallHandler'.
MethodChannel('ryanheise.com/audioServiceBackgroundInverse').setMockMethodCallHandler(handler);

@anantraj2808
Copy link

Flutter Upgrade doesn't work, anyone have a different solution?

Mentioned one possible solution above. Please check

@sushanmagar
Copy link

I had this issue while navigating to next page.
Reason:- No automatic import.
Solution: - I imported the page manually.

@SezDeep
Copy link

SezDeep commented Jul 9, 2021

Solved it by creating this functions then passing the image location/name
Image image(String name) { return Image.asset(name); }

@dhanushkakavinda
Copy link

flutter upgrade is the perfect answer for this issue

@samvolton
Copy link

did not work, it does not get info from the class

@vikas960188
Copy link

  1. Run "flutter pub outdated". This will tell you all the outdated packages your project is using.
  2. Then run "flutter pub upgrade --major-versions". This will upgrade all the outdated version.
    This helped me.

it is not working ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests