Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[web] Customize path of index.html and/or web directory. #78254

Open
@amritk

Description

@amritk

Use case

I am running multiple flutter apps in the same repo by specifying the main.dart file

flutter build web -t lib/appOne/appOne.dart
flutter build web -t lib/appTwo/appTwo.dart

These apps share quite a bit of code, which is why I was doing it this way. So this works great. Now the issue is, I was using the flutter-web splashscreen trick of editing the HTML file so that the user does not have to wait for the app to load to see something. Now that I have multiple apps, it would be nice to specify the HTML file name on run or build. This way I can have separate splash screens per app.

I have not found too much information about what I am trying to do. I think for now I will create three separate html files and just copy them into index.html using a script before running or building.

Proposal

Be able to specify an optional html file path when building or running a flutter-web app.

flutter build web -t lib/appOne/appOne.dart --htmlPath web/appOne.html

I have not yet dove into flutters source code to see how/if this could be possible yet but I will do so soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions