Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing different entrypoints other than 'main' #15089

Closed
bittuahlawat opened this issue Mar 2, 2018 · 4 comments
Closed

Allow passing different entrypoints other than 'main' #15089

bittuahlawat opened this issue Mar 2, 2018 · 4 comments
Labels
c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@bittuahlawat
Copy link

Steps to Reproduce

Create two entry points in a new flutter project: main and main2. Displaying main2 is not possible, because FlutterViewController always points to the main entry point.

Even though FlutterDartProject allows you to the pass other entry points using this function:

- (void)launchInEngine:(shell::Engine*)engine
        withEntrypoint:(NSString*)entrypoint
        embedderVMType:(VMType)embedderVMType
                result:(LaunchResult)result

FlutterViewController calls this other method instead:

- (void)launchInEngine:(shell::Engine*)engine
        embedderVMType:(VMType)embedderVMType
                result:(LaunchResult)result

which in turn calls the first one with a hardcoded main as the entryPoint.

 switch (_vmTypeRequirement) {
    case VMTypeInterpreter:
      [self runFromSourceInEngine:engine withEntrypoint:@"main" result:result];
      return;
    case VMTypePrecompilation:
      [self runFromPrecompiledSourceInEngine:engine withEntrypoint:@"main" result:result];
      return;
    case VMTypeInvalid:
      break;
  }

We need ability to pass in the entry point via FlutterViewController rather than it selecting one on its own in order to embed multiple flutter views in the app.

@Hixie Hixie added the engine flutter/engine repository. See also e: labels. label Mar 2, 2018
@Hixie Hixie added this to the 4: Next milestone milestone Mar 2, 2018
@Hixie Hixie added the c: new feature Nothing broken; request for a new capability label Mar 2, 2018
@tvolkert
Copy link
Contributor

This is possible now in the new Android embedding. @gaaclarke do you know if it's possible in the iOS embedding?

@tvolkert tvolkert added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 13, 2020
@tvolkert
Copy link
Contributor

Cool - I'm going to close this as fixed, then.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

4 participants