floor_annotation_community 1.1.0 copy "floor_annotation_community: ^1.1.0" to clipboard
floor_annotation_community: ^1.1.0 copied to clipboard

Floor-compatible annotations for the community-maintained Floor runtime and generator.

Floor Annotation Community #

Floor-compatible annotations shared by floor_community and floor_generator_community.

The public annotation names are intentionally kept compatible with Floor so applications can migrate without rewriting entities, DAOs, database declarations, migrations, or type-converter annotations. Most applications should import package:floor_community/floor.dart, which re-exports this package.

Example #

import 'package:floor_community/floor.dart';

@Entity(tableName: 'users')
class User {
  @PrimaryKey(autoGenerate: true)
  final int? id;

  final String name;

  const User({this.id, required this.name});
}

@dao
abstract class UserDao {
  @Query('SELECT * FROM users')
  Future<List<User>> findAll();
}

Both the class-style annotations (@Entity, @PrimaryKey) and Floor's constant shorthand annotations (@entity, @primaryKey, @dao, @insert, @update, @delete, @transaction) remain available where Floor originally provided them.

See the root MIGRATION.md for migration guidance.

0
likes
150
points
121
downloads

Documentation

API reference

Publisher

verified publisherorkitt.dev

Weekly Downloads

Floor-compatible annotations for the community-maintained Floor runtime and generator.

Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

meta

More

Packages that depend on floor_annotation_community