move open url into bottom sheet
This commit is contained in:
@@ -42,4 +42,16 @@ class GeckoBrowserService {
|
||||
Future<void> onTrimMemory(int level) {
|
||||
return _api.onTrimMemory(level);
|
||||
}
|
||||
|
||||
Future<void> openInCustomTab({
|
||||
required Uri url,
|
||||
required bool private,
|
||||
String? contextId,
|
||||
}) {
|
||||
return _api.openInCustomTab(
|
||||
url: url.toString(),
|
||||
private: private,
|
||||
contextId: contextId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5160,6 +5160,28 @@ class GeckoBrowserApi {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> openInCustomTab({required String url, required bool private, required String? contextId, }) async {
|
||||
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoBrowserApi.openInCustomTab$pigeonVar_messageChannelSuffix';
|
||||
final pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
pigeonChannelCodec,
|
||||
binaryMessenger: pigeonVar_binaryMessenger,
|
||||
);
|
||||
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[url, private, contextId]);
|
||||
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
|
||||
if (pigeonVar_replyList == null) {
|
||||
throw _createConnectionError(pigeonVar_channelName);
|
||||
} else if (pigeonVar_replyList.length > 1) {
|
||||
throw PlatformException(
|
||||
code: pigeonVar_replyList[0]! as String,
|
||||
message: pigeonVar_replyList[1] as String?,
|
||||
details: pigeonVar_replyList[2],
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GeckoSyncApi {
|
||||
|
||||
Reference in New Issue
Block a user