0
votes

I can not run my project the error is:

/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/visibility_detector-0.2.2/lib/src/visibility_detector_layer.dart:193:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.

  • 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance! ^

FAILURE: Build failed with an exception.

  • Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156

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

Process 'command 'C:\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 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156 : the error line code is: line 1156 code image

try flutter pub outdated - Ninad Sawant