LeoAndo / flutter_unsplash_app

1 stars 0 forks source link

monitor table changes in the local database #20

Open LeoAndo opened 2 years ago

LeoAndo commented 2 years ago

I want to realize the flow processing of room with Flutter.

example: (Android Kotlin (Room)) https://github.com/LeoAndo/android-compose-templates/blob/main/TemplateApp01/app/src/main/java/com/example/templateapp01/data/room/dao/TodoDao.kt#L20:L21

LeoAndo commented 2 years ago

Consider introducing floor

https://pub.dev/packages/floor https://github.com/vitusortner/floor

troubleshooting

I had the same problem as below. https://github.com/vitusortner/floor/issues/639#issue-1126300003

measures. https://github.com/vitusortner/floor/issues/641#issuecomment-1035025610

I thought that the above measures could be taken, but the following error occurred.

スクリーンショット 2022-02-13 21 24 46 スクリーンショット 2022-02-13 21 25 10

I responded according to the error content, but it was not resolved.

About floor freeze support

floor does not support freeze. It seems that it will not be supported in the future. https://github.com/vitusortner/floor/issues/481 https://github.com/vitusortner/floor/issues/481#issuecomment-758863711

BelongsH commented 2 years ago

hi man 。 i jush clone floor project and run

 flutter packages pub run build_runner build 

result is

[SEVERE] floor_generator:floor_generator on lib/database.dart (cached):

Value of onConflict must be one of OnConflictStrategy.replace,OnConflictStrategy.rollback,OnConflictStrategy.abort,OnConflictStrategy.fail,OnConflictStrategy.ignore
package:example/task_dao.dart:16:16
   ╷
16 │   Future<void> insertTask(Task task);
   │                ^^^^^^^^^^
   ╵
[SEVERE] Failed after 33ms

the floor project example not depends freezd

this is beyond my understanding

LeoAndo commented 2 years ago

@BelongsH

Thank you for your comment.

I had the same problem as you. I use a lot of packages in my project.

This time I decided to give up using floor package.

mainser commented 2 years ago

This time I decided to give up using floor package.

I also updated and have the same problem (with the unofficial version), apparently the developers are busy right now, that's why I decided to stop using floor and started using Hive. It's a shame because I liked Floor.