just_audio/ios/Classes/JustAudioPlugin.m

21 lines
709 B
Mathematica
Raw Normal View History

2019-11-28 06:55:32 +00:00
#import "JustAudioPlugin.h"
2019-11-25 14:50:21 +00:00
2019-11-28 06:55:32 +00:00
@implementation JustAudioPlugin
2019-11-25 14:50:21 +00:00
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel = [FlutterMethodChannel
2019-11-28 06:55:32 +00:00
methodChannelWithName:@"just_audio"
2019-11-25 14:50:21 +00:00
binaryMessenger:[registrar messenger]];
2019-11-28 06:55:32 +00:00
JustAudioPlugin* instance = [[JustAudioPlugin alloc] init];
2019-11-25 14:50:21 +00:00
[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