Search packages, repositories and app categories

Package detailsv2.5.5

xml_serializable

Automatically generate code for converting to and from XML by annotating Dart classes.

AndroidiOSmacOSWindowsLinux
30-day downloads
4.8K
Likes
11
Pub points
120

Install package

flutter pub add xml_serializable

Package Overview

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

xml_serializable is a Dart package that automatically generates code for serializing and deserializing Dart classes to and from XML. By annotating classes with @XmlSerializable, developers can effortlessly convert objects to XML and parse XML back into objects, reducing boilerplate and minimizing errors. It integrates seamlessly with Flutter and other Dart projects across multiple platforms. The generated code handles complex types, nested structures, and custom naming conventions. Ideal for working with XML-based APIs or data formats in cross-platform applications.

Use cases

  • Parsing XML responses from APIs
  • Generating XML for configuration files
  • Converting model objects to XML for storage
  • Handling structured data exchange between systems
  • Simplifying XML serialization in cross-platform apps

Key features

  • Automatic code generation via annotations
  • Support for nested and complex types
  • Customizable field naming and attributes
  • Cross-platform compatibility
  • Minimal boilerplate required

Suitable for

  • Developers working with XML data
  • Flutter apps needing XML integration
  • Teams using structured data interchange
  • Projects requiring efficient serialization
  • Backend services processing XML payloads

Considerations

  • Requires build_runner for code generation
  • Limited to XML format only
  • May increase build time with large models
  • Needs careful annotation setup
  • Not suitable for dynamic or unstructured XML

Original README

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

XML Serializable

Provides source_gen Generators to create code for XML serialization and deserialization.

xml_serializable Pub Version

  • Package: https://pub.dev/packages/xml_serializable
  • Source code

The core package providing Generators for XML-specific tasks.

Import it into your pubspec dev_dependencies: section.

xml_annotation Pub Version

  • Package: https://pub.dev/packages/xml_annotation
  • Source code

The annotation package which has few dependencies.

Import it into your pubspec dependencies: section.

Categories

Dependencies

Dependency list 8 items

Source repository

Projects using this package

No data available yet.