lumen_ui
Lumen UI é uma ferramenta de linha de comando para Flutter que gera componentes de interface modularizados sob demanda para manter os aplicativos leves e sustentáveis.
Lumen UI é uma ferramenta de linha de comando inovadora e de código aberto para Flutter que resolve o problema de aplicativos pesados gerando componentes de interface em tempo real. O projeto visa criar uma abordagem modular onde os desenvolvedores podem gerar apenas os componentes específicos que precisam, em vez de incluir bibliotecas inteiras como dependências.
{"sdk":"flutter"}^2.5.0^1.8.3^3.1.2^0.19.0{"sdk":"flutter"}—^2.0.0^5.4.4^1.24.0^0.12.2+2Texto original em inglês. Visite o GitHub para a versão atual.
A CLI-based Flutter package for generating modular, customizable UI components on demand.
Flutter developers often struggle with bloated UI component libraries that increase app size and affect performance. Lumen UI CLI solves this by providing a command-line tool that generates only the components you need, with full customization options.
For complete knowledge about the package, please visit the official documentation website:
Follow these steps to set up your Flutter project and integrate Lumen UI:
flutter create my_app
cd my_app
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)📚 New to Flutter? Check out the official Flutter documentation for detailed setup instructions.
Add this line to your pubspec.yaml under dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lumen_ui: 0.0.1 # Add Lumen UI package
Run this command in your project directory:
flutter pub get
Run this command to verify the installation:
flutter pub list
You should see lumen_ui: 1.0.0 in the list of installed packages.
🎉 Congratulations! You're now ready to use Lumen UI in your Flutter project.
Continue to the Usage section to learn how to implement Lumen UI components.
dart run lumen_ui [options]
| Option | Alias | Description | Required |
|---|---|---|---|
--type |
-t |
Type of component to generate | Yes |
--name |
-n |
Name of the component | Yes |
--output |
-o |
Output directory (defaults to lib/ui) |
No |
--help |
-h |
Show help information | No |
--version |
-v |
Show version information | No |
--verbose |
- | Enable verbose logging | No |
button: Button componentsdummy: Dummy components for testingList all supported types and their related UIs:
dart run lumen_ui --list
List all supported component types:
dart run lumen_ui --list-types
List related UIs for a specific component type:
dart run lumen_ui --list-uis button
Generate a primary button:
dart run lumen_ui -t button -u primarybutton -n primary
Generate with custom output directory:
dart run lumen_ui -t button -u iconbutton -n iconbtn -o lib/components
Components are generated in the following structure:
lib/ui/
├── buttons/
│ └── primary_button
└── primary_button.dart
└── styles/
└── color.dart
└── styles.dart
Common error messages and solutions:
Both --type, --ui and --name are required: Ensure both -t, -u and -n options are providedInvalid component name: Follow the component naming rulesError parsing arguments: Check the command syntaxInvalid argument format: Verify option values are correctShow help:
dart run lumen_ui --help
Show version:
dart run lumen_ui --version
The project follows a Layered Architecture pattern with:
MIT License