mirror of
https://github.com/RxReader/link_kit.git
synced 2025-08-26 11:18:30 +08:00
21 lines
715 B
Objective-C
21 lines
715 B
Objective-C
#import "LinkKitPlugin.h"
|
|
|
|
@implementation LinkKitPlugin
|
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
|
FlutterMethodChannel* channel = [FlutterMethodChannel
|
|
methodChannelWithName:@"v7lin.github.io/link_kit"
|
|
binaryMessenger:[registrar messenger]];
|
|
LinkKitPlugin* instance = [[LinkKitPlugin alloc] init];
|
|
[registrar addMethodCallDelegate:instance channel:channel];
|
|
}
|
|
|
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
|
if ([@"getPlatformVersion" isEqualToString:call.method]) {
|
|
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
|
|
} else {
|
|
result(FlutterMethodNotImplemented);
|
|
}
|
|
}
|
|
|
|
@end
|