another-flushbar icon indicating copy to clipboard operation
another-flushbar copied to clipboard

1.10.29 - Compilation Error: missing null operator in flushbar.dart

Open TammiLion opened this issue 2 years ago • 2 comments

Getting the following compilation error for 1.10.29 (does not occur in 1.10.28). Probably just needs a ? operator.

`../../Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/another_flushbar-1.10.29/lib/flushbar.dart:350:31: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.

  • 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../Flutter/flutter/packages/flutter/lib/src/scheduler/binding.dart'). Try calling using ?. instead. SchedulerBinding.instance.addPostFrameCallback( ^^^^^^^^^^^^^^^^^^^^`

TammiLion avatar Jun 08 '22 10:06 TammiLion

it is because of flutter 3. You should update your flutter sdk

utkudenis avatar Jun 08 '22 17:06 utkudenis

it there another solution except for @utkudenis suggestion because I can't flutter SDK

it is because of flutter 3. You should update your flutter sdk

moradiyajay avatar Jun 22 '22 09:06 moradiyajay