You can copy the link of this repository and paste it in buildpacks or write diezep/flutter and will be added automatically.
In Heroku CLI:
$ heroku buildpacks:set diezep/flutter -a <Heroku App name>
You can add optional environment variables to customize the deployment of your project but nothing is required, all are optional.
By default, this buildpack get the last version of Flutter automatically, sometimes because is on beta channel, that version may have problems to compile a project with web support in cloud services.
If this is your case, you can try downgrade the Flutter version manually, add FLUTTER_VERSION variable in your Heroku environment with the number of the version that are currently working web support.
All variables were built following the structure FLUTTER_VARNAME to identified easily in Heroku configurations. If you want to use some variable, remember use the structure following to the variable.Variable Type Default Description CLEANUP boolean true Remove uneccessary files of your project after the compile. VERSION string Last version in beta channel. The name of the version you want to use to compile the project.
Example of setting CLEANUP var in Heroku CLI:
$ heroku config:set FLUTTER_CLEANUP=true -a project-name
The next image is an example of setting environment variables following the structure mentioned above :
This buildpack is unofficial that means i don't have any conection with Heroku or Google from Flutter developer team . This repository was made as a hobby, i'm always interested in learn new things, this is one demostration of that :)
Copy the snippet above into CLI.