#include "AppDelegate.h" #include "GeneratedPluginRegistrant.h" #import "Runner-Swift.h" #import "ZBarSDK.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GeneratedPluginRegistrant registerWithRegistry:self]; FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; FlutterMethodChannel* scannerChannel = [FlutterMethodChannel methodChannelWithName:@"com.yourcompany.checker/scanner" binaryMessenger:controller]; [scannerChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) { ScannerViewController *modalViewController = [ScannerViewController new]; [controller presentViewController:modalViewController animated:YES completion:nil]; }]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } - (void) showScanner { } @end