You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
996 B
Swift
31 lines
996 B
Swift
//
|
|
// BlueGpsPlugin.swift
|
|
// Runner
|
|
//
|
|
// Created by Penguin .
|
|
//
|
|
|
|
import Foundation
|
|
import Flutter
|
|
|
|
/**
|
|
* A Flutter plugin for integrating Penguin SDK functionality.
|
|
* This class registers a view factory with the Flutter engine to create native views.
|
|
*/
|
|
class PenguinPlugin: NSObject, FlutterPlugin {
|
|
|
|
/**
|
|
* Registers the plugin with the Flutter engine.
|
|
*
|
|
* @param registrar The [FlutterPluginRegistrar] used to register the plugin.
|
|
* This method is called when the plugin is initialized, and it sets up the communication
|
|
* between Flutter and native code.
|
|
*/
|
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
|
// Create an instance of PenguinViewFactory with the binary messenger from the registrar
|
|
let factory = PenguinViewFactory(messenger: registrar.messenger())
|
|
|
|
// Register the view factory with a unique ID for use in Flutter code
|
|
registrar.register(factory, withId: "penguin_native")
|
|
}
|
|
} |