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

What Version that i can use, with no error ?

Open MartinDewe opened this issue 4 years ago • 3 comments

Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.

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

FAILURE: Build failed with an exception.

==================================

another_flushbar: ^1.10.27 ( I tried using this, but same )

MartinDewe avatar May 31 '22 07:05 MartinDewe

Nahh, Version is ok, but null safty inside instance. #69

MartinDewe avatar May 31 '22 07:05 MartinDewe

Any suggestion to solve this error?

raudyagdel avatar May 31 '22 23:05 raudyagdel

im still waiting creator to approve my pull request, maybe you can downgrade to 1.10.28 or maybe you can edit flushbar.dart inside your .pub-cache and just add ! inside SchedulerBinding.instance.addPostFrameCallback to SchedulerBinding.instance!.addPostFrameCallback after that just run your project...

floxydio avatar Jun 02 '22 09:06 floxydio