FLUTTER ECOSYSTEM

zorphy

一个强大的 Dart/Flutter 代码生成包,提供干净的类定义,支持 copyWith、JSON 序列化、toString、相等性以及继承

最新版本
2.4.3
近 30 天下载
2.1万
喜欢数
0
Pub 分数
120

Package Overview

基于插件公开资料生成的选型评价,仅供参考。

插件概览

Zorphy 是一个 Dart/Flutter 代码生成包,可简化创建干净、可维护的类,内置对 copyWith、JSON 序列化、toString、相等性检查和继承的支持。它通过根据注解自动生成必要方法来减少样板代码,提高代码可读性和开发人员生产力。非常适合需要结构化数据模型且手动实现最少的项目。

适合场景
  • Generating immutable data classes
  • Automating JSON serialization
  • Creating reusable model classes
  • Simplifying state management
  • Enabling easy object copying with copyWith
  • Supporting inheritance in generated classes
主要特点
  • Automatic copyWith method generation
  • Built-in JSON serialization
  • Generated toString and equality methods
  • Inheritance support in generated classes
  • Minimal boilerplate with annotations
  • Cross-platform compatibility
适合对象
  • Flutter developers using state management
  • Teams prioritizing code consistency
  • Projects with heavy data modeling
  • Apps requiring JSON parsing
  • Developers seeking reduced boilerplate
  • Those using code generation workflows
使用建议
  • Requires understanding of code generation concepts
  • Needs build_runner for compilation
  • May increase build time slightly
  • Limited to classes annotated with Zorphy directives
  • Dependent on correct annotation usage
  • Not suitable for dynamic or runtime-only structures
支持平台AndroidiOSLinuxmacOSWindows

安装插件

flutter pub add zorphy

所属分类

依赖

依赖清单 14 项

源码仓库

关联项目

暂无相关数据。

所在榜单