Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
misspelling
  • Loading branch information
bparrishMines committed Apr 28, 2022
commit 6d7fdfd3bd7a63b27eb008f04767521d8bc66874
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ NSObject<FlutterMessageCodec> *FWFWKWebViewHostApiGetCodec(void);
fileURL:(NSString *)url
readAccessURL:(NSString *)readAccessUrl
error:(FlutterError *_Nullable *_Nonnull)error;
- (void)loadAssetForWebViewWithIdintefier:(NSNumber *)instanceId
- (void)loadAssetForWebViewWithIdentifier:(NSNumber *)instanceId
assetKey:(NSString *)key
error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1711,17 +1711,17 @@ void FWFWKWebViewHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
binaryMessenger:binaryMessenger
codec:FWFWKWebViewHostApiGetCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(loadAssetForWebViewWithIdintefier:
NSCAssert([api respondsToSelector:@selector(loadAssetForWebViewWithIdentifier:
assetKey:error:)],
@"FWFWKWebViewHostApi api (%@) doesn't respond to "
@"@selector(loadAssetForWebViewWithIdintefier:assetKey:error:)",
@"@selector(loadAssetForWebViewWithIdentifier:assetKey:error:)",
api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray *args = message;
NSNumber *arg_instanceId = GetNullableObjectAtIndex(args, 0);
NSString *arg_key = GetNullableObjectAtIndex(args, 1);
FlutterError *error;
[api loadAssetForWebViewWithIdintefier:arg_instanceId assetKey:arg_key error:&error];
[api loadAssetForWebViewWithIdentifier:arg_instanceId assetKey:arg_key error:&error];
callback(wrapResult(nil, error));
}];
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ - (void)goForwardForWebViewWithIdentifier:(nonnull NSNumber *)instanceId
[[self webViewForIdentifier:instanceId] goForward];
}

- (void)loadAssetForWebViewWithIdintefier:(nonnull NSNumber *)instanceId
- (void)loadAssetForWebViewWithIdentifier:(nonnull NSNumber *)instanceId
assetKey:(nonnull NSString *)key
error:(FlutterError *_Nullable __autoreleasing *_Nonnull)error {
NSString *assetFilePath = [FlutterDartProject lookupKeyForAsset:key];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ abstract class WKWebViewHostApi {
@ObjCSelector('loadFileForWebViewWithIdentifier:fileURL:readAccessURL:')
void loadFileUrl(int instanceId, String url, String readAccessUrl);

@ObjCSelector('loadAssetForWebViewWithIdintefier:assetKey:')
@ObjCSelector('loadAssetForWebViewWithIdentifier:assetKey:')
void loadFlutterAsset(int instanceId, String key);

@ObjCSelector('canGoBackForWebViewWithIdentifier:')
Expand Down