Commit 52262fce authored by Javohir Savriy's avatar Javohir Savriy
Browse files

Initial commit

parents
#import <Flutter/Flutter.h>
@interface MyIdPlugin : NSObject<FlutterPlugin>
@end
\ No newline at end of file
#import "MyIdPlugin.h"
#if __has_include(<myid/myid-Swift.h>)
#import <myid/myid-Swift.h>
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
#import "myid-Swift.h"
#endif
@implementation MyIdPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[SwiftMyIdPlugin registerWithRegistrar:registrar];
}
@end
import Foundation
// import Onfido
//
// public class AppearancePublic: NSObject {
//
// public let primaryColor: UIColor
// public let primaryTitleColor: UIColor
// public let primaryBackgroundPressedColor: UIColor
// public let supportDarkMode: Bool
//
// public init(
// primaryColor: UIColor,
// primaryTitleColor: UIColor,
// primaryBackgroundPressedColor: UIColor,
// supportDarkMode: Bool = true) {
// self.primaryColor = primaryColor
// self.primaryTitleColor = primaryTitleColor
// self.primaryBackgroundPressedColor = primaryBackgroundPressedColor
// self.supportDarkMode = supportDarkMode
// }
// }
//
// public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
//
// if let jsonResult = config as? Dictionary<String, AnyObject> {
// let primaryColor: UIColor = (jsonResult["onfidoPrimaryColor"] == nil)
// ? UIColor.primaryColor : UIColor.from(hex: jsonResult["onfidoPrimaryColor"] as! String)
// let primaryTitleColor: UIColor = (jsonResult["onfidoPrimaryButtonTextColor"] == nil)
// ? UIColor.white : UIColor.from(hex: jsonResult["onfidoPrimaryButtonTextColor"] as! String)
// let primaryBackgroundPressedColor: UIColor = (jsonResult["onfidoPrimaryButtonColorPressed"] == nil)
// ? UIColor.primaryButtonColorPressed : UIColor.from(hex: jsonResult["onfidoPrimaryButtonColorPressed"] as! String)
// let supportDarkMode: Bool = (jsonResult["onfidoIosSupportDarkMode"] == nil)
// ? true : jsonResult["onfidoIosSupportDarkMode"] as! Bool
//
//
// let appearancePublic = AppearancePublic(
// primaryColor: primaryColor,
// primaryTitleColor: primaryTitleColor,
// primaryBackgroundPressedColor: primaryBackgroundPressedColor,
// supportDarkMode: supportDarkMode
// )
// return appearancePublic
// } else {
// return nil
// }
// }
//
// public func loadAppearanceFromConfig(config: NSDictionary) throws -> Appearance {
// let appearancePublic = try loadAppearance(config: config)
//
// if let appearancePublic = appearancePublic {
// return Appearance(
// primaryColor: appearancePublic.primaryColor,
// primaryTitleColor: appearancePublic.primaryTitleColor,
// primaryBackgroundPressedColor: appearancePublic.primaryBackgroundPressedColor,
// supportDarkMode: appearancePublic.supportDarkMode
// )
// } else {
// return Appearance.default;
// }
// }
//
// public func buildOnfidoConfig(config:NSDictionary, appearance: Appearance) throws -> Onfido.OnfidoConfigBuilder {
// let sdkToken:String = config["sdkToken"] as! String
// let flowSteps:NSDictionary? = config["flowSteps"] as? NSDictionary
// let captureDocument:NSDictionary? = flowSteps?["captureDocument"] as? NSDictionary
// let captureFace:NSDictionary? = flowSteps?["captureFace"] as? NSDictionary
//
// var onfidoConfig = OnfidoConfig.builder()
// .withSDKToken(sdkToken)
// .withAppearance(appearance)
//
//
// if flowSteps?["welcome"] as? Bool == true {
// onfidoConfig = onfidoConfig.withWelcomeStep()
// }
//
// if let docType = captureDocument?["docType"] as? String, let countryCode = captureDocument?["countryCode"] as? String {
// switch docType {
// case "PASSPORT":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .passport(config: PassportConfiguration()))
// case "DRIVING_LICENCE":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .drivingLicence(config: DrivingLicenceConfiguration(country: countryCode)))
// case "NATIONAL_IDENTITY_CARD":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .nationalIdentityCard(config: NationalIdentityConfiguration(country: countryCode)))
// case "RESIDENCE_PERMIT":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .residencePermit(config: ResidencePermitConfiguration(country: countryCode)))
// case "VISA":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .visa(config: VisaConfiguration(country: countryCode)))
// case "WORK_PERMIT":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .workPermit(config: WorkPermitConfiguration(country: countryCode)))
// case "GENERIC":
// onfidoConfig = onfidoConfig.withDocumentStep(ofType: .generic(config: GenericDocumentConfiguration(country: countryCode)))
// default:
// throw NSError(domain: "Unsupported document type", code: 0)
// }
// } else if captureDocument != nil {
// onfidoConfig = onfidoConfig.withDocumentStep()
// }
//
// if let faceVariant = captureFace?["type"] as? String {
// if faceVariant == "VIDEO" {
// onfidoConfig = onfidoConfig.withFaceStep(ofVariant: .video(withConfiguration: VideoStepConfiguration(showIntroVideo: true, manualLivenessCapture: false)))
// } else if faceVariant == "PHOTO" {
// onfidoConfig = onfidoConfig.withFaceStep(ofVariant: .photo(withConfiguration: nil))
// } else {
// throw NSError(domain: "Invalid or unsupported face variant", code: 0)
// }
// }
// return onfidoConfig;
// }
//
// @objc(OnfidoSdk)
// class OnfidoSdk: NSObject {
//
// @objc static func requiresMainQueueSetup() -> Bool {
// return false
// }
//
// @objc func start(_ config: NSDictionary, result: @escaping FlutterResult) -> Void {
// DispatchQueue.main.async {
// let withConfig = config["config"] as! NSDictionary
// let withAppearance = config["appearance"] as! NSDictionary
// self.run(withConfig: withConfig, withAppearance: withAppearance, result: result)
// }
// }
//
// private func run(withConfig config: NSDictionary, withAppearance appearanceConfig: NSDictionary, result: @escaping FlutterResult) {
//
// do {
// let appearance = try loadAppearanceFromConfig(config: appearanceConfig)
// let onfidoConfig = try buildOnfidoConfig(config: config, appearance: appearance)
// let builtOnfidoConfig = try onfidoConfig.build()
//
// // Copy the face varient from the config since it is not contained in the response:
// let flowSteps:NSDictionary? = config["flowSteps"] as? NSDictionary
// let captureFace:NSDictionary? = flowSteps?["captureFace"] as? NSDictionary
// let faceVariant = captureFace?["type"] as? String
//
// let onfidoFlow = OnfidoFlow(withConfiguration: builtOnfidoConfig)
// .with(responseHandler: { [weak self] response in
// guard let `self` = self else { return }
// switch response {
// case let .error(error):
// result(FlutterError(code: "error", message: "Encountered an error: \(error)", details: nil))
// return;
// case let .success(results):
// result(createResponse(results, faceVariant: faceVariant))
// return;
// case .cancel:
// result(FlutterError(code: "cancel", message: "User canceled flow", details: nil))
// return;
// default:
// result(FlutterError(code: "error", message: "Unknown error has occured", details: nil))
// return;
// }
// })
//
// let onfidoRun = try onfidoFlow.run()
// UIApplication.shared.windows.first?.rootViewController?.present(onfidoRun, animated: true)
// } catch let error as NSError {
// result(FlutterError(code: "error", message: error.domain, details: nil))
// return;
// } catch {
// result(FlutterError(code: "error", message: "Error running Onfido SDK", details: nil))
// return;
// }
// }
// }
//
// extension UIColor {
//
// static var primaryColor: UIColor {
// return decideColor(light: UIColor.from(hex: "#353FF4"), dark: UIColor.from(hex: "#3B43D8"))
// }
//
// static var primaryButtonColorPressed: UIColor {
// return decideColor(light: UIColor.from(hex: "#232AAD"), dark: UIColor.from(hex: "#5C6CFF"))
// }
//
// private static func decideColor(light: UIColor, dark: UIColor) -> UIColor {
// #if XCODE11
// guard #available(iOS 13.0, *) else {
// return light
// }
// return UIColor { (collection) -> UIColor in
// return collection.userInterfaceStyle == .dark ? dark : light
// }
// #else
// return light
// #endif
// }
//
// static func from(hex: String) -> UIColor {
//
// let hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines)
// let scanner = Scanner(string: hexString)
//
// if hexString.hasPrefix("#") {
// scanner.scanLocation = 1
// }
//
// var color: UInt32 = 0
// scanner.scanHexInt32(&color)
//
// let mask = 0x000000FF
// let redInt = Int(color >> 16) & mask
// let greenInt = Int(color >> 8) & mask
// let blueInt = Int(color) & mask
//
// let red = CGFloat(redInt) / 255.0
// let green = CGFloat(greenInt) / 255.0
// let blue = CGFloat(blueInt) / 255.0
//
// return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
// }
// }
//
// extension Appearance {
//
// static let `default` = Appearance(
// primaryColor: UIColor.primaryColor,
// primaryTitleColor: UIColor.white,
// primaryBackgroundPressedColor: UIColor.primaryButtonColorPressed)
// }
import Foundation
// import Onfido
//
// func createResponse(_ results: [OnfidoResult], faceVariant: String?) -> [String: [String: Any]] {
// var jsonResponse = [String: [String: Any]]()
//
// let document: [OnfidoResult]? = results.filter({ result in
// if case OnfidoResult.document = result { return true }
// return false;
// });
//
// let onfidoResult: OnfidoResult? = document?.first
//
// let face: OnfidoResult? = results.filter({ result in
// if case OnfidoResult.face = result { return true }
// return false
// }).first
//
// if let documentUnwrapped = onfidoResult, case OnfidoResult.document(let documentResponse) = documentUnwrapped {
// jsonResponse["document"] = ["front": ["id": documentResponse.front.id]]
//
// if let back = documentResponse.back {
// jsonResponse["document"]?["back"] = ["id": back.id]
// }
// }
//
// if let faceUnwrapped = face, case OnfidoResult.face(let faceResponse) = faceUnwrapped {
// jsonResponse["face"] = ["id": faceResponse.id, "variant": faceVariant!]
// }
//
// return jsonResponse
// }
import Flutter
import UIKit
public class SwiftMyIdPlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "myid", binaryMessenger: registrar.messenger())
let instance = SwiftMyIdPlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
result("iOS " + UIDevice.current.systemVersion)
}
}
// @available(iOS 11.0, *)
// public class SwiftFlutterOnfidoPlugin: NSObject, FlutterPlugin {
// private let onfidoSdk = OnfidoSdk()
//
// public static func register(with registrar: FlutterPluginRegistrar) {
// let channel = FlutterMethodChannel(name: "flutter_onfido", binaryMessenger: registrar.messenger())
// let instance = SwiftFlutterOnfidoPlugin()
// registrar.addMethodCallDelegate(instance, channel: channel)
// }
//
// public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
// if(call.method.elementsEqual("start")){
// let config = call.arguments as! NSDictionary
// onfidoSdk.start(config, result: result)
// }
// }
// }
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint myid.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'myid'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin project.'
s.description = <<-DESC
A new Flutter plugin project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
end
enum MyIdBuildMode {
PRODUCTION,
DEBUG
}
enum MyIdEntryType {
AUTH,
FACE
}
enum MyIdResidentType {
USER_DEFINED,
RESIDENT,
NON_RESIDENT
}
enum MyIdLocale {
UZBEK,
ENGLISH,
RUSSIAN
}
enum MyIdCameraShape {
CIRCLE,
ELLIPSE
}
enum MyIdResolution {
RESOLUTION_480,
RESOLUTION_720
}
enum MyIdImageFormat {
JPG,
PNG
}
\ No newline at end of file
import 'package:flutter/services.dart';
import 'dart:async';
import 'dart:convert';
import 'myid_config.dart';
class MyIdClient {
static const MethodChannel _channel = MethodChannel('myid');
static const JsonDecoder _jsonDecoder = JsonDecoder();
static const JsonEncoder _jsonEncoder = JsonEncoder();
static Future<MyIdResult> start({
required MyIdConfig config,
MyIdIOSAppearance iosAppearance = const MyIdIOSAppearance(),
}) async {
final confingJson = config.toJson();
final result = await _channel.invokeMethod('startSdk', {
"config": confingJson,
"appearance": iosAppearance.toJson(),
});
return MyIdResult.fromJson(
_jsonDecoder.convert(
_jsonEncoder.convert(result),
),
);
}
}
\ No newline at end of file
import 'enums.dart';
part 'myid_config.g.dart';
class MyIdConfig {
final String clientId;
final String? passportData;
final String? dateOfBirth;
final String? sdkHash;
final String? externalId;
final double? threshold;
final MyIdBuildMode? buildMode;
final MyIdEntryType? entryType;
final MyIdResidentType? residency;
final MyIdLocale? locale;
final MyIdCameraShape? cameraShape;
final MyIdResolution? resolution;
final MyIdImageFormat? imageFormat;
final MyIdOrganizationDetails? organizationDetails;
final bool? withPhoto;
MyIdConfig({
required this.clientId,
this.passportData,
this.dateOfBirth,
this.sdkHash,
this.externalId,
this.threshold,
this.buildMode,
this.entryType,
this.residency,
this.locale,
this.cameraShape,
this.resolution,
this.imageFormat,
this.organizationDetails,
this.withPhoto,
});
factory MyIdConfig.fromJson(Map<String, dynamic> json) =>
_$MyIdConfigFromJson(json);
Map<String, dynamic> toJson() => _$MyIdConfigToJson(this);
}
class MyIdResult {
final String? code;
final double? comparison;
final String? base64;
MyIdResult({
this.code,
this.comparison,
this.base64
});
factory MyIdResult.fromJson(Map<String, dynamic> json) =>
_$MyIdResultFromJson(json);
}
class MyIdOrganizationDetails {
final String? phone;
const MyIdOrganizationDetails({
required this.phone
});
factory MyIdOrganizationDetails.fromJson(Map<String, dynamic> json) =>
_$MyIdOrganizationDetailsFromJson(json);
Map<String, dynamic> toJson() => _$MyIdOrganizationDetailsToJson(this);
}
class MyIdIOSAppearance {
final String? primaryColor;
final String? secondaryColor;
final String? errorColor;
final String? primaryButtonColor;
final String? primaryButtonColorDisabled;
final String? primaryButtonTextColor;
final String? primaryButtonTextColorDisabled;
final int? buttonCornerRadius;
const MyIdIOSAppearance({
this.primaryColor,
this.secondaryColor,
this.errorColor,
this.primaryButtonColor,
this.primaryButtonColorDisabled,
this.primaryButtonTextColor,
this.primaryButtonTextColorDisabled,
this.buttonCornerRadius,
});
factory MyIdIOSAppearance.fromJson(Map<String, dynamic> json) =>
_$MyIdIOSAppearanceFromJson(json);
Map<String, dynamic> toJson() => _$MyIdIOSAppearanceToJson(this);
}
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'myid_config.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
return MyIdConfig(
clientId: json['clientId'] as String,
passportData: json['passportData'] as String,
dateOfBirth: json['dateOfBirth'] as String,
sdkHash: json['sdkHash'] as String,
externalId: json['externalId'] as String,
threshold: json['threshold'] as double,
buildMode: _$enumDecodeNullable(_$MyIdBuildModeEnumMap, json['buildMode']),
entryType: _$enumDecodeNullable(_$MyIdEntryTypeEnumMap, json['entryType']),
residency: _$enumDecodeNullable(_$MyIdResidentTypeEnumMap, json['residency']),
locale: _$enumDecodeNullable(_$MyIdLocaleEnumMap, json['locale']),
cameraShape: _$enumDecodeNullable(_$MyIdCameraShapeEnumMap, json['cameraShape']),
resolution: _$enumDecodeNullable(_$MyIdResolutionEnumMap, json['resolution']),
imageFormat: _$enumDecodeNullable(_$MyIdImageFormatEnumMap, json['imageFormat']),
organizationDetails: MyIdOrganizationDetails.fromJson(json['organizationDetails'] as Map<String, dynamic>),
withPhoto: json['withPhoto'] as bool,
);
}
Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
final val = <String, dynamic>{};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('clientId', instance.clientId);
writeNotNull('passportData', instance.passportData);
writeNotNull('dateOfBirth', instance.dateOfBirth);
writeNotNull('sdkHash', instance.sdkHash);
writeNotNull('externalId', instance.externalId);
writeNotNull('threshold', instance.threshold);
writeNotNull('buildMode', _$MyIdBuildModeEnumMap[instance.buildMode]);
writeNotNull('entryType', _$MyIdEntryTypeEnumMap[instance.entryType]);
writeNotNull('residency', _$MyIdResidentTypeEnumMap[instance.residency]);
writeNotNull('locale', _$MyIdLocaleEnumMap[instance.locale]);
writeNotNull('cameraShape', _$MyIdCameraShapeEnumMap[instance.cameraShape]);
writeNotNull('resolution', _$MyIdResolutionEnumMap[instance.resolution]);
writeNotNull('imageFormat', _$MyIdImageFormatEnumMap[instance.imageFormat]);
writeNotNull('organizationDetails', instance.organizationDetails?.toJson());
writeNotNull('withPhoto', instance.withPhoto);
return val;
}
MyIdResult _$MyIdResultFromJson(Map<String, dynamic> json) {
return MyIdResult(
code: json['code'] as String?,
comparison: json['comparison'] as double?,
base64: json['base64'] as String?
);
}
Map<String, dynamic> _$MyIdOrganizationDetailsToJson(MyIdOrganizationDetails instance) {
final val = <String, dynamic>{};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('phone', instance.phone);
return val;
}
MyIdOrganizationDetails _$MyIdOrganizationDetailsFromJson(Map<String, dynamic> json) {
return MyIdOrganizationDetails(
phone: json['phone'] as String?,
);
}
Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
final val = <String, dynamic>{};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('primaryColor', instance.primaryColor);
writeNotNull('secondaryColor', instance.secondaryColor);
writeNotNull('errorColor', instance.errorColor);
writeNotNull('primaryButtonColor', instance.primaryButtonColor);
writeNotNull('primaryButtonColorDisabled', instance.primaryButtonColorDisabled);
writeNotNull('primaryButtonTextColorDisabled', instance.primaryButtonTextColorDisabled);
writeNotNull('buttonCornerRadius', instance.buttonCornerRadius);
return val;
}
MyIdIOSAppearance _$MyIdIOSAppearanceFromJson(Map<String, dynamic> json) {
return MyIdIOSAppearance(
primaryColor: json['primaryColor'] as String?,
secondaryColor: json['secondaryColor'] as String?,
errorColor: json['errorColor'] as String?,
primaryButtonColor: json['primaryButtonColor'] as String?,
primaryButtonColorDisabled: json['primaryButtonColorDisabled'] as String?,
primaryButtonTextColorDisabled: json['primaryButtonTextColorDisabled'] as String?,
buttonCornerRadius: json['buttonCornerRadius'] as int?,
);
}
const _$MyIdBuildModeEnumMap = {
MyIdBuildMode.PRODUCTION: 'PRODUCTION',
MyIdBuildMode.DEBUG: 'DEBUG',
};
const _$MyIdEntryTypeEnumMap = {
MyIdEntryType.AUTH: 'AUTH',
MyIdEntryType.FACE: 'FACE',
};
const _$MyIdResidentTypeEnumMap = {
MyIdResidentType.USER_DEFINED: 'USER_DEFINED',
MyIdResidentType.RESIDENT: 'RESIDENT',
MyIdResidentType.NON_RESIDENT: 'NON_RESIDENT',
};
const _$MyIdLocaleEnumMap = {
MyIdLocale.UZBEK: 'UZB',
MyIdLocale.ENGLISH: 'ENG',
MyIdLocale.RUSSIAN: 'RUS',
};
const _$MyIdCameraShapeEnumMap = {
MyIdCameraShape.CIRCLE: 'CIRCLE',
MyIdCameraShape.ELLIPSE: 'ELLIPSE',
};
const _$MyIdResolutionEnumMap = {
MyIdResolution.RESOLUTION_480: 'RESOLUTION_480',
MyIdResolution.RESOLUTION_720: 'RESOLUTION_720',
};
const _$MyIdImageFormatEnumMap = {
MyIdImageFormat.JPG: 'JPG',
MyIdImageFormat.PNG: 'PNG',
};
T? _$enumDecodeNullable<T>(
Map<T, dynamic> enumValues,
dynamic source, {
T? unknownValue,
}) {
if (source == null) {
return null;
}
return _$enumDecode<T>(enumValues, source, unknownValue: unknownValue);
}
T? _$enumDecode<T>(
Map<T, dynamic> enumValues,
dynamic source, {
T? unknownValue,
}) {
if (source == null) {
throw ArgumentError('A value must be provided. Supported values: '
'${enumValues.values.join(', ')}');
}
final value = enumValues.entries.singleWhere((e) => e.value == source).key;
if (value == null && unknownValue == null) {
throw ArgumentError('`$source` is not one of the supported values: '
'${enumValues.values.join(', ')}');
}
return value ?? unknownValue;
}
\ No newline at end of file
name: myid
description: MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
version: 1.0.5
homepage: https://pub.dev/packages/myid
repository: https://gitlab.myid.uz/myid/mobile/myid-sample-flutter
issue_tracker: https://gitlab.myid.uz/myid/mobile/myid-sample-flutter/-/issues
environment:
sdk: ">=2.17.6 <3.0.0"
flutter: ">=2.5.0"
dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
# which should be registered in the plugin registry. This is required for
# using method channels.
# The Android 'package' specifies package in which the registered class is.
# This is required for using method channels on Android.
# The 'ffiPlugin' specifies that native code should be built and bundled.
# This is required for using `dart:ffi`.
# All these are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin:
platforms:
android:
package: uz.aigroup.myid
pluginClass: MyIdPlugin
ios:
pluginClass: MyIdPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment