FLUTTER ECOSYSTEM

realm_generator

Generates RealmObject classes from Realm data model classes. This package is part of the official Realm Flutter and Realm Dart SDKs.

Latest version
20.2.0
30-day downloads
12.6K
Likes
4
Pub points
130

Package Overview

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

Overview

Realm Generator is a code generation tool that automatically creates RealmObject classes from your Realm data model definitions in Flutter and Dart projects. Part of the official Realm SDK, it simplifies database schema management by generating type-safe, optimized classes for working with Realm's persistent storage. The generator ensures consistency between models and the underlying database structure, reducing boilerplate and minimizing runtime errors. It integrates seamlessly into the build process via Flutter’s pub system.

Use cases
  • Automatically generate RealmObject classes from data models
  • Simplify database schema definition in Flutter apps
  • Reduce manual coding of persistent data classes
  • Ensure type safety in Realm-based data access
  • Support complex object relationships in Realm databases
Key features
  • Generates RealmObject classes from model definitions
  • Integrates with Flutter's build system
  • Produces type-safe, optimized code
  • Supports nested objects and relationships
  • Enforces schema consistency at compile time
Suitable for
  • Flutter developers using Realm for local persistence
  • Projects requiring strong typing and performance in data storage
  • Teams wanting to minimize boilerplate in database models
  • Apps with complex data structures needing reliable schema management
Considerations
  • Requires use of the Realm SDK
  • Needs proper setup in pubspec.yaml
  • Build-time dependency; not available at runtime
  • May require additional configuration for custom fields
  • Limited to Realm-specific data modeling approach
Supported platformsmacOSWindowsLinux

Install package

flutter pub add realm_generator

Categories

Dependencies

Dependency list 8 items

Source repository

Related projects

No data available yet.