Skip to content

Abstract Builder class to share some parameters #114567

@Nayuta403

Description

@Nayuta403

Use case

Create from:
flutter/engine#36963 (comment)

Now we have too many builders, NewEngineIntentBuilder, CachedEngineIntentBuilder, as well as the increase of NewEngineInGroupIntentBuilder. They have some common parameters (especially NewEngineIntentBuilder and NewEngineInGroupIntentBuilder, because they are starting a new engine), in FlutterActivity, FlutterFragmentActivity, FlutterFragment all appear.

Proposal

Abstract a Builder class with some parameters used by Dart like entryPoint, initialRoute, dartEntrypointArgs. Then Actvitity or fragments of the Builder extends from this class, and contains specific attributes, such as activityClass/fragmentClass. Many of such NewEngineIntentBuilder and NewEngineInGroupIntentBuilder fields can be Shared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions