FLUTTER ECOSYSTEM

openapi_freezed_dio_builder

Generate models and API classes based on an OpenAPI document using Freezed and Dio.

openapi_freezed_dio_builder cover
Latest version
0.9.7
30-day downloads
26
Likes
29
Pub points
100

Package Overview

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

Overview

A Flutter/Dart package that generates type-safe models and API clients from OpenAPI specifications using Freezed for immutable data classes and Dio for HTTP requests. It streamlines backend integration by automatically creating Dart code tailored to the API structure, reducing boilerplate and improving maintainability. Ideal for projects relying on REST APIs defined via OpenAPI (Swagger), it ensures consistency between API contracts and client implementations.

Use cases
  • Automatically generate API clients from OpenAPI specs
  • Create immutable data models with Freezed
  • Simplify REST API integration in Flutter apps
  • Maintain synchronization between API and client code
  • Support multi-platform apps with shared API logic
Key features
  • Code generation from OpenAPI documents
  • Immutable models using Freezed
  • Dio-based HTTP client integration
  • Type-safe API endpoints
  • Customizable code generation templates
Suitable for
  • Flutter developers using OpenAPI-defined APIs
  • Teams needing consistent API-client generation
  • Projects requiring immutable data models
  • Apps targeting multiple platforms
  • Developers wanting to reduce manual API code
Considerations
  • Requires an OpenAPI specification file
  • Generated code must be managed carefully during updates
  • Limited to OpenAPI 2.0 and 3.x formats
  • Manual configuration may be needed for complex schemas
  • Best used in CI/CD pipelines for consistent regeneration
Supported platformsAndroidiOSmacOSWindowsLinux

Install package

flutter pub add openapi_freezed_dio_builder

Categories

Dependencies

Dependency list 15 items

Source repository

Related projects

No data available yet.