SimformSolutionsPvtLtd / flutter_credit_card

A credit card widget for Flutter application.
https://pub.dev/packages/flutter_credit_card
MIT License
431 stars 261 forks source link

flutter_credit_card:compileDebugKotlin #173

Open liukeyankevin opened 1 month ago

liukeyankevin commented 1 month ago

flutter 3.24
flutter_credit_card: ^4.0.1

flutter_credit_card-4.0.1/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt:18:35 Property delegate must have a 'getValue(GyroscopeStreamHandler, KProperty<>)' method. None of the following functions is suitable: public inline operator fun Lazy<Sensor?>.getValue(thisRef: Any?, property: KProperty<>): Sensor? defined in kotlin

FAILURE: Build completed with 2 failures.

What went wrong: Execution failed for task ':flutter_credit_card:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details

talhakosen commented 1 month ago

For temp soluyion :

Go to GyroscopeStreamHandler.kt

make the return type nullable

private val sensor: Sensor? by lazy { sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) }