akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to configure launch flavor with arguments (args)?

jonsaw opened this issue · comments

In VS Code, we can setup a flavor like the following:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch development Chrome (:4000)",
            "request": "launch",
            "type": "dart",
            "program": "lib/main.dart",
            "args": [
                "--flavor", "development",
                "--target", "lib/main_development.dart",
                "-d", "chrome","--web-port", "4000"
            ]
        }
    ]
}

How do I write similar configuration flavor in .nvim.lua?

require("flutter-tools").setup_project({
	{
		name = "Development Chrome (:4000)",
		flavor = "development",
		target = "lib/main_development.dart",
		device = "chrome",
		-- how do I pass in args?
	},
})