TheAlphamerc/flutter_ecommerce_app

Error when run

Closed this issue · 1 comments

Hello,
When i run app it have error:
Compiler message:
../flutter/.pub-cache/hosted/pub.dartlang.org/google_fonts-0.3.9/lib/src/google_fonts_base.dart:185:30: 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 /Users/quanghoa/FLUTTER/flutter_ecommerce_app/lib/main.dart

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/quanghoa/FLUTTER/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 789

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

Process 'command '/Users/quanghoa/FLUTTER/flutter/bin/flutter'' 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 13s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 13.9s
Gradle task assembleDebug failed with exit code 1

Try flutter clean command in the terminal before run app.