Gorniv / vscode-flutter-files

Quickly create files for flutter using a BLoC pattern
https://marketplace.visualstudio.com/items?itemName=gornivv.vscode-flutter-files
MIT License
59 stars 25 forks source link

Improve: More custom #41

Closed tanphuccgl closed 1 year ago

tanphuccgl commented 1 year ago

hi, can i customize more?. such as being able to remove unnecessary type commands and type templates for base . And one more thing. Can I customize with keyboard shortcuts or cmd commands?

Gorniv commented 1 year ago

Hi. You can copy templates and use ff.config.json for customization commands. Custom command you can use from "[FF] New with dynamic config". "keyboard shortcuts or cmd commands" - not really:

image
{
    "name": "mobile",
    "configs": [
        {
            "name": "bloc",
            "commands": [
                {
                    "name": "[FF] New Big Pack Bloc",
                    "templates": ["*"],
                    "key": "bigpack",
                    "files": [
                        "bloc",
                        "di",
                        "event",
                        "model",
                        "page",
                        "provider",
                        "repository",
                        "state",
                        "index",
                        "theme",
                        "cache_manager",
                        "navigate",
                        "screen",
                        "store"
                    ]
                },
                {
                    "name": "[FF] New Small Pack Bloc",
                    "key": "smallpack",
                    "templates": ["*"],
                    "files": [
                        "bloc",
                        "di",
                        "event",
                        "index",
                        "page",
                        "screen",
                        "state",
                        "theme"
                    ]
                },
                {
                    "name": "[FF] New Bloc",
                    "templates": ["*"],
                    "files": ["bloc"]
                },
                {
                    "name": "[FF] New Store",
                    "templates": ["*"],
                    "files": ["store"]
                },
                {
                    "name": "[FF] New Event",
                    "templates": ["*"],
                    "files": ["event"]
                },
                {
                    "name": "[FF] New Model",
                    "templates": ["*"],
                    "files": ["model"]
                },
                {
                    "name": "[FF] New Page",
                    "templates": ["*"],
                    "files": ["page"]
                },
                {
                    "name": "[FF] New Provider",
                    "templates": ["*"],
                    "files": ["provider"]
                },
                {
                    "name": "[FF] New Repository",
                    "templates": ["*"],
                    "files": ["repository"]
                },
                {
                    "name": "[FF] New Screen",
                    "templates": ["*"],
                    "files": ["screen"]
                },
                {
                    "name": "[FF] New State",
                    "templates": ["*"],
                    "files": ["state"]
                },
                {
                    "name": "[FF] New Index",
                    "templates": ["*"],
                    "files": ["index"]
                },
                {
                    "name": "[FF] New Navigate(Navme)",
                    "templates": ["*"],
                    "files": ["navigate"]
                },
                {
                    "name": "[FF] New DI",
                    "templates": ["*"],
                    "files": ["di"]
                },
                {
                    "name": "[FF] New Theme",
                    "templates": ["*"],
                    "files": ["theme"]
                },
                {
                    "name": "[FF] New Socket Action",
                    "templates": ["socket_action"],
                    "files": [
                        "action",
                        "error_handler",
                        "index",
                        "registrar",
                        "request",
                        "response"
                    ]
                },
                {
                    "name": "[FF] New Socket Message",
                    "templates": ["socket_message"],
                    "files": [
                        "dto",
                        "error_handler",
                        "index",
                        "message_handler",
                        "message"
                    ]
                },
                {
                    "name": "[FF] New Api Service",
                    "templates": ["api_service"],
                    "files": [
                        "di",
                        "service",
                        "error_interceptor",
                        "request",
                        "requests\\get",
                        "requests\\post",
                        "index"
                    ]
                },
                {
                    "name": "[FF] Tests",
                    "templates": ["test"],
                    "files": [
                        "repository_mock",
                        "provider_mock",
                        "bloc_test",
                        "golden_test",
                        "data_mock"
                    ]
                },
                {
                    "name": "[FF] Test Api",
                    "templates": ["test_api"],
                    "files": ["api_test"]
                }
            ]
        }
    ]
}