Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
ShareViewController.m
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
7@interface ShareViewController ()
8
9@end
10
11@implementation ShareViewController
12
13- (instancetype)init {
14 FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest" project:nil];
15 [engine run];
16 self = [self initWithEngine:engine nibName:nil bundle:nil];
17 self.view.accessibilityIdentifier = @"flutter_view";
18
19 [engine.binaryMessenger
20 setMessageHandlerOnChannel:@"waiting_for_status"
21 binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) {
23 methodChannelWithName:@"driver"
24 binaryMessenger:engine.binaryMessenger
26 [channel invokeMethod:@"set_scenario" arguments:@{@"name" : @"app_extension"}];
27 }];
28 return self;
29}
30
31@end
FlutterBinaryMessengerConnection setMessageHandlerOnChannel:binaryMessageHandler:(NSString *channel, [binaryMessageHandler] FlutterBinaryMessageHandler handler)
instancetype sharedInstance()
instancetype methodChannelWithName:binaryMessenger:codec:(NSString *name,[binaryMessenger] NSObject< FlutterBinaryMessenger > *messenger,[codec] NSObject< FlutterMethodCodec > *codec)
instancetype initWithEngine:nibName:bundle:(FlutterEngine *engine,[nibName] nullable NSString *nibName,[bundle] nullable NSBundle *NS_DESIGNATED_INITIALIZER)