Search packages, repositories and app categories

Package detailsv1.4.2+2

morphy

Provides a clean class definition with extra functionality including; copy with, json serializable, tostring, equals that supports inheritance and polymorphism

AndroidiOSWebmacOSWindowsLinux
30-day downloads
36
Likes
18
Pub points
100

Install package

flutter pub add morphy

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Morphy is a Flutter/Dart package that simplifies class definitions by providing built-in functionality such as copyWith, JSON serialization, toString, and equality checks that support inheritance and polymorphism. It reduces boilerplate code through code generation, making it easier to manage immutable data classes across platforms. The package integrates seamlessly with Flutter's ecosystem and supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux. It is ideal for developers seeking clean, maintainable, and scalable data models.

Use cases

  • Creating immutable data classes
  • Generating JSON serializers
  • Simplifying state management
  • Supporting inheritance in data models
  • Cross-platform data handling

Key features

  • CopyWith functionality
  • JSON serialization
  • Polymorphic equality
  • Inheritance-aware equals
  • Automatic toString generation
  • Code generation

Suitable for

  • Flutter developers
  • State management with immutable data
  • JSON-heavy applications
  • Large-scale app development
  • Teams prioritizing code cleanliness

Considerations

  • Requires code generation setup
  • May increase build time
  • Needs understanding of build_runner
  • Limited to classes annotated with @morphy
  • Best used with modern Dart practices

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

see morphy package

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

No data available yet.