flutter plugin for zebra multiplatform sdk

FlutterZsdkPlugin.m 719B

123456789101112131415161718192021
  1. #import "FlutterZsdkPlugin.h"
  2. @implementation FlutterZsdkPlugin
  3. + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  4. FlutterMethodChannel* channel = [FlutterMethodChannel
  5. methodChannelWithName:@"flutter_zsdk"
  6. binaryMessenger:[registrar messenger]];
  7. FlutterZsdkPlugin* instance = [[FlutterZsdkPlugin 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