Home > Blockchain >  Error in Flutter src /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.3/lib/get_navigation
Error in Flutter src /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.3/lib/get_navigation

Time:05-16

This always appear an error to me I use Flutter 2.14

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.3/lib/get_navigation/src/extension_navigation.dart:357:33: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
Try calling using ?. instead.
      SchedulerBinding.instance.addPostFrameCallback((_) {
                                ^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.3/lib/get_navigation/src/extension_navigation.dart:468:33: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
Try calling using ?. instead.

CodePudding user response:

Update

get: ˆ4.6.1

to

get: 4.6.1

in your pubspec.

  • Related