lumen_ui
Lumen UI は、Flutter 向けの CLI ツールであり、アプリを軽量化し、保守性を保つために必要に応じてモジュール式の UI コンポーネントを生成します。
Lumen UI は、Flutter 向けの革新的なオープンソース CLI ツールであり、必要に応じて UI コンポーネントを生成することで、アプリケーションの肥大化という問題を解決します。このプロジェクトの目的は、開発者が必要な特定のコンポーネントのみをスケルトン化できるモジュール式アプローチを構築することです。これにより、全体の UI ライブラリを依存関係として含める必要がなくなります。
{"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+2以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
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