akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp
MIT License
935 stars 75 forks source link

feat: add install/uninstall cmd to menu #285

Closed bruce3x closed 6 months ago

bruce3x commented 9 months ago

I added two commands for installing and uninstalling the app, which is useful in the scenario of testing the initial installation of the app.

akinsho commented 9 months ago

@sidlatau any thoughts on this 🙏🏾 LGTM but not gonna be able to try it. Is it useful to have in your opinion

bruce3x commented 9 months ago

This feature is inspired by the adb-idea plugin. image

sidlatau commented 9 months ago

Looks like it does not work when the app uses flavors. For example, to uninstall it should construct such command respecting project configuration: flutter install --uninstall-only --flavor dev Flavors may be set up in .nvim.lua file in the project:

require("flutter-tools").setup_project({
    {
        name = "DEV",
        flavor = "dev"
    },
    {
        name = "PROD",
        flavor = "prod"
    },
})
sidlatau commented 6 months ago

I will close it as it is implemented in /pull/315. Thanks @bruce3x for the initial code!