ShoesSdkPlugin.m 709 B

1234567891011121314151617181920
  1. #import "ShoesSdkPlugin.h"
  2. @implementation ShoesSdkPlugin
  3. + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  4. FlutterMethodChannel* channel = [FlutterMethodChannel
  5. methodChannelWithName:@"ShoesSdkPlugin"
  6. binaryMessenger:[registrar messenger]];
  7. ShoesSdkPlugin* instance = [[ShoesSdkPlugin alloc] init];
  8. [registrar addMethodCallDelegate:instance channel:channel];
  9. }
  10. - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
  11. if ([@"getPlatformVersion" isEqualToString:call.method]) {
  12. result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
  13. } else {
  14. result(FlutterMethodNotImplemented);
  15. }
  16. }
  17. @end