Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 17 additions & 7 deletions testing/scenario_app/lib/src/platform_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,6 @@ class PlatformViewClipPathScenario extends PlatformViewScenario {

builder.pushOffset(0, 0);

// Create a path of rectangle with width of 200 and height of 300, starting from (100, 100).
//
// Refer to "../../ios/Scenarios/Scenarios/ScenariosUITests/golden_platform_view_clippath_iPhone SE_simulator.png" for the exact path after clipping.
final Path path = Path()
..moveTo(100, 100)
..quadraticBezierTo(50, 250, 100, 400)
Expand Down Expand Up @@ -632,11 +629,18 @@ mixin _BasePlatformViewScenarioMixin on Scenario {
);
}

void _addPlatformViewtoScene(SceneBuilder sceneBuilder, int viewId, double width, double height) {
void _addPlatformViewtoScene(
SceneBuilder sceneBuilder,
int viewId,
double width,
double height, {
Offset overlayOffset,
}) {
overlayOffset ??= const Offset(50, 50);
if (Platform.isIOS) {
sceneBuilder.addPlatformView(viewId, width: width, height: height);
sceneBuilder.addPlatformView(viewId, offset: overlayOffset, width: width, height: height);
} else if (Platform.isAndroid && _textureId != null) {
sceneBuilder.addTexture(_textureId, offset: const Offset(150, 300), width: width, height: height);
sceneBuilder.addTexture(_textureId, offset: overlayOffset, width: width, height: height);
} else {
throw UnsupportedError('Platform ${Platform.operatingSystem} is not supported');
}
Expand All @@ -649,7 +653,13 @@ mixin _BasePlatformViewScenarioMixin on Scenario {
Offset overlayOffset,
}) {
overlayOffset ??= const Offset(50, 50);
_addPlatformViewtoScene(sceneBuilder, viewId, 500, 500);
_addPlatformViewtoScene(
sceneBuilder,
viewId,
500,
500,
overlayOffset: overlayOffset,
);
final PictureRecorder recorder = PictureRecorder();
final Canvas canvas = Canvas(recorder);
canvas.drawCircle(
Expand Down