چرا پکیج ها در متدود چنل نصب نمیشه؟
0
سلام وقت بخیر م میخوام یک پلاگین ایجاد کنم ولی فایل پلاگین کلا با کد شما متفاوت هستش ، مشکل در نصب نشدن این چند تا پکیج هست نصب میشه و خطا میده میشه لطفا راهمایی کنید؟..import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result.....این خطا میده..Unresolved reference: io .. کد هم به این شکل هست... ```/**
NativePathAndroidPlugin */
class NativePathAndroidPlugin: FlutterPlugin, MethodCallHandler {
/// The MethodChannel that will the communication between Flutter and native Android
///
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
/// when the Flutter Engine is detached from the Activity
private lateinit var channel : MethodChannel
override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "native_path_android")
channel.setMethodCallHandler(this)
}
override fun onMethodCall(call: MethodCall, result: Result) {
if (call.method == "getPlatformVersion") {
result.success("Android ${Build.VERSION.RELEASE}")
} else {
result.notImplemented()
}
}
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
channel.setMethodCallHandler(null)
}
}```
دیدگاهها (0)
دیدگاه خود را بنویسید