This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter_android] Adds support for selecting Hybrid Composition #6864
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7abc278
add displayWithHybridComposition flag
bparrishMines 5c617f4
move duplicate method
bparrishMines faddb47
unit tests
bparrishMines 05d7b57
adds
bparrishMines e96f315
update docs
bparrishMines 7ebcbfd
create platformviewsserviceproxy
bparrishMines 2d9d0ab
use proxy for platformviewsservice
bparrishMines 00afe9c
remove usused code
bparrishMines c96c29d
update display mode
bparrishMines 799b7b2
use clever imports
bparrishMines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/webview_flutter/webview_flutter_android/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
packages/webview_flutter/webview_flutter_android/lib/src/platform_views_service_proxy.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // 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 'package:flutter/material.dart'; | ||
| import 'package:flutter/services.dart'; | ||
|
|
||
| /// Proxy that provides access to the platform views service. | ||
| /// | ||
| /// This service allows creating and controlling platform-specific views. | ||
| @immutable | ||
| class PlatformViewsServiceProxy { | ||
| /// Constructs a [PlatformViewsServiceProxy]. | ||
| const PlatformViewsServiceProxy(); | ||
|
|
||
| /// Proxy method for [PlatformViewsService.initExpensiveAndroidView]. | ||
| ExpensiveAndroidViewController initExpensiveAndroidView({ | ||
| required int id, | ||
| required String viewType, | ||
| required TextDirection layoutDirection, | ||
| dynamic creationParams, | ||
| MessageCodec<dynamic>? creationParamsCodec, | ||
| VoidCallback? onFocus, | ||
| }) { | ||
| return PlatformViewsService.initExpensiveAndroidView( | ||
| id: id, | ||
| viewType: viewType, | ||
| layoutDirection: layoutDirection, | ||
| creationParams: creationParams, | ||
| creationParamsCodec: creationParamsCodec, | ||
| onFocus: onFocus, | ||
| ); | ||
| } | ||
|
|
||
| /// Proxy method for [PlatformViewsService.initSurfaceAndroidView]. | ||
| SurfaceAndroidViewController initSurfaceAndroidView({ | ||
| required int id, | ||
| required String viewType, | ||
| required TextDirection layoutDirection, | ||
| dynamic creationParams, | ||
| MessageCodec<dynamic>? creationParamsCodec, | ||
| VoidCallback? onFocus, | ||
| }) { | ||
| return PlatformViewsService.initSurfaceAndroidView( | ||
| id: id, | ||
| viewType: viewType, | ||
| layoutDirection: layoutDirection, | ||
| creationParams: creationParams, | ||
| creationParamsCodec: creationParamsCodec, | ||
| onFocus: onFocus, | ||
| ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.