搜索插件、代码仓与 APP 分类

插件详情v1.4.2

mvvm_cli_nerdzlab

MVVM CLI 工具,一个用于简化 MVVM 项目创建的命令行实用程序。

macOSWindowsLinux
近 30 天下载
24
喜欢数
1
Pub 分数
120

安装插件

flutter pub add mvvm_cli_nerdzlab

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

MVVM CLI 工具是一个命令行实用程序,可简化在 Flutter 项目中设置 MVVM(模型-视图-视图模型)架构的过程。它会自动创建项目结构,包括模型、视图、视图模型以及必要的样板代码。该工具专为希望实现一致且可扩展的 Flutter 应用组织结构的开发者设计,可减少重复的设置任务并促进最佳实践。该工具支持 macOS、Windows 和 Linux,跨平台使用方便。它通过 pub.dev 与 Flutter 无缝集成。

适合场景

  • 使用 MVVM 快速搭建新的 Flutter 项目
  • 自动化 MVVM 组件的文件夹和文件生成
  • 在团队之间保持项目结构的一致性
  • 通过减少样板设置来加速开发
  • 使用预定义模板支持敏捷工作流程

主要特点

  • 自动化 MVVM 文件夹和文件创建
  • 跨平台支持(macOS、Windows、Linux)
  • 与 Flutter 的 pub.dev 包系统集成
  • 基于模板的项目骨架生成
  • 可配置的项目结构

适合对象

  • 采用MVVM架构的Flutter开发者
  • 需要标准化项目设置的团队
  • 初学者学习MVVM模式
  • 使用结构化代码进行快速原型设计
  • 旨在减少手动设置时间的开发人员

使用建议

  • 需要熟悉 MVVM 概念
  • 超出所提供模板的自定义功能有限
  • 依赖外部 GitHub 仓库以获取更新
  • 生成后可能需要手动调整
  • 更适合新项目,而不是重构现有项目

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

MVVM CLI Tool

MVVM CLI Tool, a command-line utility designed to streamline the creation of MVVM (Model-View-ViewModel) projects. This tool automates the initial setup of your MVVM architecture, making it easier and faster to get started with your development process.

Features & Usage

  • Create New Projects: Generate a complete MVVM project.
  • Git Initial Commits(optional): Initial commits in created project.

Use mvvm create.

  • Analyze .arb files: Analyze arb files for usage in dart code, and delete not necessary arb keys.

Use mvvm analyze --arb.

  • Generate Colors & TextStyles: Generate colors from .xml files and TextStyles from text_style_const.dart file.

Use mvvm generate or specify the --colors or --textStyle to generate only one type: mvvm generate --colors.

Installation

To install the MVVM CLI tool, run:

dart pub global activate mvvm_cli_nerdzlab

Once the tool is activated, you need to add the .pub-cache/bin directory to your system's PATH to ensure that you can run the mvvm commands from any location in your terminal. This can be done by adding the following line to your shell configuration file (e.g., .bashrc, .zshrc, or .bash_profile):

export PATH="$PATH":"$HOME/.pub-cache/bin"

Verification

To verify that the installation was successful and the PATH is correctly set, run:

mvvm

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目

暂无相关数据。