funwithflutter / flutter_confetti

A Flutter widget that shoots confetti all over the screen.
https://pub.dev/packages/confetti
MIT License
439 stars 79 forks source link

Exception in Android builds #62

Closed the100rabh closed 2 years ago

the100rabh commented 2 years ago

I was trying this awesome widget. It works fine in chrome for me but errors out in Android builds. Following is the error I see and everything in the screen goes black. Not sure if this is enough for you to debug the issue.

/home/the100rabh/.pub-cache/hosted/pub.dartlang.org/confetti-0.6.0/lib/src/confetti.dart:229:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/home/the100rabh/snap/flutter/common/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
armandojimenez commented 2 years ago

Any update on this?

funwithflutter commented 2 years ago

Flutter 3.0 made this non-nullable. So this is just a warning and nothing to worry about. But will be removed in the latest release (0.7). Closing this as the new release will be out soon.