giandifra / arcore_flutter_plugin

Flutter plugin for ARCore SDK, Android platform to build new augmented reality experiences
MIT License
435 stars 280 forks source link

Fix nullable bug #198

Open bakatsuyuki opened 2 years ago

bakatsuyuki commented 2 years ago

There is a bug with null safety like this:

/Users/bakatsuyuki/flutter/.pub-cache/hosted/pub.dartlang.org/arcore_flutter_plugin-0.1.0-null-safety.3/android/src/main/kotlin/com/difrancescogianmarco/arcore_flutter_plugin/ArcoreFlutterPlugin.kt: (32, 74): Type mismatch: inferred type is Activity? but Activity was expected

FAILURE: Build failed with an exception.

So I fixed it to return if the activity is null.