This repository was archived by the owner on Sep 14, 2023. It is now read-only.
forked from flutter-team-archive/plugins
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFWFObjectHostApi.h
More file actions
45 lines (38 loc) · 1.53 KB
/
Copy pathFWFObjectHostApi.h
File metadata and controls
45 lines (38 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Flutter/Flutter.h>
#import "FWFGeneratedWebKitApis.h"
#import "FWFInstanceManager.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Flutter api implementation for NSObject.
*
* Handles making callbacks to Dart for an NSObject.
*/
@interface FWFObjectFlutterApiImpl : FWFNSObjectFlutterApi
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
instanceManager:(FWFInstanceManager *)instanceManager;
- (void)observeValueForObject:(NSObject *)instance
keyPath:(NSString *)keyPath
object:(NSObject *)object
change:(NSDictionary<NSKeyValueChangeKey, id> *)change
completion:(void (^)(NSError *_Nullable))completion;
@end
/**
* Implementation of NSObject for FWFObjectHostApiImpl.
*/
@interface FWFObject : NSObject
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
instanceManager:(FWFInstanceManager *)instanceManager;
@end
/**
* Host api implementation for NSObject.
*
* Handles creating NSObject that intercommunicate with a paired Dart object.
*/
@interface FWFObjectHostApiImpl : NSObject <FWFNSObjectHostApi>
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
@end
NS_ASSUME_NONNULL_END