nextwidget 1.0.1 copy "nextwidget: ^1.0.1" to clipboard
nextwidget: ^1.0.1 copied to clipboard

A Flutter package providing a collection of customizable widget templates and a CLI tool for generating components, making it easy to create common UI elements.

NextWidget #

NextWidget is a powerful Flutter package that allows you to generate UI components via command-line interface (CLI), similar to shadcn ui for React.

Features #

  • Generate Flutter widgets and components from the command line
  • Customizable templates for different types of components
  • Easy integration with existing Flutter projects
  • Configurable output directory and naming conventions

Installation #

Add nextwidget to your pubspec.yaml file:

dev_dependencies:
  nextwidget: ^1.0.1

Or install it from the command line:

dart pub add nextwidget --dev

### Usage

To generate a new component, run the following command:

dart run bin/nextwidget.dart generate --name custom_button --type widget

This will generate a new Flutter widget called `CustomButton` in the `lib/components` directory.

You can customize the component's template by adding a `nextwidget.yaml` file to your project's root directory. The `nextwidget.yaml` file should contain a mapping of component names to their respective templates.

For example, to customize the `CustomButton` component, you can add the following to your `nextwidget.yaml` file:

```yaml
custom_button: lib/src/templates/custom_button_template.dart

This will generate a new CustomButton component with the specified template.

You can also customize the output directory and naming conventions by adding a nextwidget.yaml file to your project's root directory. The nextwidget.yaml file should contain a mapping of component names to their respective output paths.

Listing available components #

dart run nextwidget list

Add the --verbose flag for more details:

Configuration #

output_dir: lib/components

theme:

primary_color: '#3498db' secondary_color: '#2ecc71'

Contributing #

We welcome contributions! Please see our CONTRIBUTING.md file for details on how to contribute to this project.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
140
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package providing a collection of customizable widget templates and a CLI tool for generating components, making it easy to create common UI elements.

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

unknown (license)

Dependencies

args, flutter, path, yaml

More

Packages that depend on nextwidget