androidImplKtTemplate function

String androidImplKtTemplate(
  1. String org,
  2. String pluginName,
  3. String className,
  4. String moduleName,
)

Implementation

String androidImplKtTemplate(
  String org,
  String pluginName,
  String className,
  String moduleName,
) =>
    '''
package $org.$pluginName

import android.content.Context
import nitro.$moduleName.Hybrid${className}Spec

/// Native implementation of Hybrid${className}Spec.
/// This file is yours to edit — the interface is generated by `nitrogen generate`.
class ${className}Impl(private val context: Context) : Hybrid${className}Spec {

    override fun add(a: Double, b: Double): Double = a + b

    override suspend fun getGreeting(name: String): String = "Hello, \$name!"
}
''';