The QR Code Scanner package for Appeto SDK.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

28 行
898 B

  1. //
  2. // QRViewFactory.swift
  3. // flutter_qr
  4. //
  5. // Created by Julius Canute on 21/12/18.
  6. //
  7. import Foundation
  8. public class QRViewFactory: NSObject, FlutterPlatformViewFactory {
  9. var registrar: FlutterPluginRegistrar?
  10. public init(withRegistrar registrar: FlutterPluginRegistrar){
  11. super.init()
  12. self.registrar = registrar
  13. }
  14. public func create(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?) -> FlutterPlatformView {
  15. var dictionary = args as! Dictionary<String, Double>
  16. return QRView(withFrame: CGRect(x: 0, y: 0, width: dictionary["width"] ?? 0, height: dictionary["height"] ?? 0), withRegistrar: registrar!,withId: viewId)
  17. }
  18. public func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
  19. return FlutterStandardMessageCodec(readerWriter: FlutterStandardReaderWriter())
  20. }
  21. }