The registration and setup of the plugin is done in a similar way to the HandsOnBackgroundProcessPlugin class. This time, in the register() static function, we have the following:
public static func register(with registrar: FlutterPluginRegistrar) { let channel = FlutterMethodChannel( name: "com.example.handson/plugin_channel", binaryMessenger: registrar.messenger() ) let instance = SwiftHandsOnBackgroundProcessPlugin( registrar: registrar ) registrar.addMethodCallDelegate(instance, channel: channel)}
Like in the Android version, it configures the method channel called com.example.handson/plugin_channel, which is used to initialize the calculation through the initBackgroundProcess method, as ...