Skip to content

[Multiview] Make SingletonFlutterWindow safe to use when the implicit view is disabled #131651

@dkwingsmt

Description

@dkwingsmt

SingletonFlutterWindow window is a global variable that represents the only window of a single-view Flutter app. Since flutter/engine#42991, this variable is a normal FlutterView with ID of _implicitViewId!, which will crash the app if the implicit view is disabled. We must address this issue by the end of phase 2 when the runners are allowed to disable the implicit view.

Part of:

Goal:

  • Using window in whatever ways should not trigger errors when the implicit view is disabled.
  • Instead of mapping window to an arbitrary existing view, which should provide expected behaviors: the window corresponds to the implicit view, such as FlutterEngine.viewController.

Conclusion:

  • Using window when the implicit view is disabled should be no-ops.
  • All methods that accept a FlutterView should check whether the view refers to a disabled implicit view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: multi windowIssues related to multi window supportc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions