Comments (3)
Hi and thanks for the report! The problem is caused by the missing dart:async
import in the file where your database is defined. I'll update the README asap.
Did this solve the error?
+ import 'dart:async';
import 'package:floor/floor.dart';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart' as sqflite;
import './person.dart';
import './person-dao.dart';
part 'database.g.dart'; // the generated code will be there
@Database(version: 1, entities: [Person])
abstract class TestDatabase extends FloorDatabase {
static Future<TestDatabase> openDatabase() async => _$open();
PersonDao get personDao;
}
from floor.
Yeah, i looked into the source code of floor example and compared it with my code, I found two issues. 1st one is that you just mentioned, it will solve undefined StreamController issue, and 2nd is to annotate your entity class with annotation @Entity
, instead of @entity
. It will fix issue of undefined PersonMapper error.
Please update this in doc too.
Thanks @vitusortner
from floor.
@entity
is meant to work as well. A fix will be introduced with the next release.
from floor.
Related Issues (20)
- Dumplicate field name when entity implement form abstract class HOT 1
- duplicate field name when entity implement form abstract class
- Unhandled Exception: type 'Null' is not a subtype of type 'double' in type cast HOT 1
- This exception cannot be executed on the entire floor library
- trying to get a SUM of a field with floor. HOT 1
- Custom Database File Path HOT 1
- sqlite wal HOT 1
- How to update a List of an object as field of entity into table in Floor
- How add rawQuery added ?? HOT 2
- Are there any plans to adapt HarmonyOS HOT 4
- Imports collision HOT 1
- #802 still an issue. any help?
- Casting to double might not work; HOT 1
- dependencies issue HOT 5
- Invalid query (failing to parse) does not throw an error
- onCreate callback is not being called, "tbl not found" exception
- How to select with like ??? HOT 3
- type missmatch int <-> double
- Primary id does not work
- No stream updates with quoted table name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from floor.