Skip to content

Potential logical operator bug introduced in recent PR #67343

@flar

Description

@flar

I was looking at some code in platform_view.dart and saw what I think is a bug. Here is the line of code.

if (size.width < _currentAndroidViewSize.width || size.height < _currentAndroidViewSize.height && clipBehavior != Clip.none) {

The precedence of logical operators would result in this test being (width_test) || (height_test && clip_none_test) but I believe that the intention was probably (width_test || height_test) && (clip_none_test).

Here is the relevant PR: #65910

Metadata

Metadata

Assignees

Labels

a: platform-viewsEmbedding Android/iOS views in Flutter appsframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions