floor_annotation 0.6.0

Floor #

A supportive SQLite abstraction for your Flutter applications.

Don't import this package! You should be using the floor package, which comes with all the annotations. Separating the packages brings some benefits for developing the library but not for the users of it.

Floor - the bottom layer of a Room.

Bugs and Feedback #

For bugs, questions and discussions please use the Github Issues.

License #

Copyright 2019 Vitus Ortner

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Changelog #

0.6.0 #

  • Add @ignore annotation

0.5.0 #

  • Update dependency

0.4.0 #

  • Add primary key field to @Entity annotation

0.3.1 #

Changes #

  • Revert meta package to version 1.1.6

0.3.0 #

Changes #

  • Use TypeChecker for all annotations
  • Add publishing instructions
  • Remove unused annotation names
  • Simplify the mapping from an entity to a map
  • Fix database writer test
  • Make stream emit query result on subscription
  • Update example to use StreamBuilder
  • Update README

🐛 Bug Fixes #

  • Correct mapper instance name referenced by generated query methods

0.2.0 #

Changes #

  • Add database adapters
  • Run floor Flutter tests
  • Move value objects to value_objects directory
  • Map source elements into value objects in processors
  • Use GeneratorForAnnotation and TypeChecker to verify annotations
  • Throw more specific errors on obfuscated database annotation

🚀 Features #

  • Add support for migrations
  • Add support for returning Streams as query result
  • Support accessing data from Data Access Objects
  • Add entity classes to database annotation
  • Add support for indices

0.1.0 #

🚀 Features #

  • Support conflict strategies when inserting and updating records (#67) @vitusortner
  • Add support for running queries that return void (#61) @vitusortner
  • Add support for foreign keys (#59) @vitusortner
  • Add parameter verification for query methods (#57) @vitusortner
  • Return deleted row count on delete (#53) @vitusortner
  • Return updated rows count on update (#52) @vitusortner
  • Return ID/s of inserted item/s (#51) @vitusortner
  • Add support for transactions (#49) @vitusortner
  • Add support for changing (insert, update, delete) lists (#42) @vitusortner
  • Support custom entity name (#41) @vitusortner
  • Enable NOT NULL columns (#40) @vitusortner
  • Enable custom column name mapping (#39) @vitusortner
  • Add delete methods code generation and fix update methods (#22) @vitusortner
  • Add update methods code generation (#21) @vitusortner
  • Add insert methods code generation (#20) @vitusortner
  • Add code generator for query methods (#17) @vitusortner
  • Code generation for database creation (#13) @vitusortner

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  floor_annotation: ^0.6.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:floor_annotation/floor_annotation.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and floor_annotation.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
meta ^1.1.8 1.1.8