Abstract Builder class to share some parameters #114567
Labels
c: proposal
A detailed proposal for a change to Flutter
engine
flutter/engine repository. See also e: labels.
P3
Issues that are less important to the Flutter project
platform-android
Android applications specifically
team-android
Owned by Android platform team
triaged-android
Triaged by Android platform team
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.
The text was updated successfully, but these errors were encountered: