You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pub Studio is a Visual Studio Code extension designed to simplify the management of Flutter/Dart packages and plugins directly within the editor. This extension provides a seamless experience for developers, allowing them to manage dependencies, run scripts, and view package information without leaving the editor.
Features
Scripts Management: Easily run common Flutter and Dart scripts.
Actions: Add, update, or remove dependencies with ease.
Dependencies: View and manage your project's dependencies and dev dependencies.
Integrated Pubspec Management: Navigate to dependency definitions within the pubspec.yaml file.
Makefile Support: Automatically detect and add Makefile targets to scripts.
Custom Commands: Support for custom commands defined in settings.json.
Installation
To install Pub Studio:
Open Visual Studio Code.
Go to the Extensions view by clicking on the Extensions icon in the Sidebar.
Search for Pub Studio.
Click on the Install button.
Usage
Sidebar Views
Pub Studio adds an icon to the VS Code sidebar. Clicking on this icon will open the Pub Studio panel, which includes sections for Scripts, Actions, Dependencies, and Dev Dependencies.
Scripts
Flutter Clean.
Static Analysis.
Dart Fix: Applies fixes with dart fix --apply.
Dart Format.
Makefile Targets: Automatically detected and added from your Makefile.
Custom Commands: Defined in your settings.json.
Actions
Installs all dependencies.
Sort all dependencies.
Remove unused dependencies.
Add dependency(single or multiple).
Add Dev Dependency(single or multiple).
Dependencies
View Dependencies: Displays all project dependencies. Right-click on a dependency to update or remove it.
View Dev Dependencies: Displays all dev dependencies. Right-click on a dev dependency to update or remove it.
Nested Workspaces
Workspace-Specific Management: Manage scripts, actions, dependencies, and dev dependencies for each nested workspace individually.
Unified View: All nested workspaces are displayed under a unified view in the Pub Studio sidebar, allowing for easy navigation and management.
Commands
Pub Studio provides several commands accessible from the command palette (Cmd+Shift+P or Ctrl+Shift+P):
Pub Studio: Install All Dependencies
Pub Studio: Sort All Dependencies
Pub Studio: Remove Unused Dependencies
Pub Studio: Add Dependency
Pub Studio: Add Dev Dependency
Pub Studio: Update Dependency
Pub Studio: Remove Dependency
Custom Commands Support
Pub Studio now supports custom commands defined in your VS Code settings.json. These commands will appear in the Scripts section of the Pub Studio panel, allowing you to run them directly from VS Code.
How to Use
Open your settings.json file in VS Code.
Add your custom commands under pubStudio.customCommands.
Pub Studio also supports Makefile targets. It automatically detects targets in your Makefile and adds them to the Scripts section, allowing you to run them directly from Pub Studio.