简体   繁体   中英

Make BLoC state persistent for making an offline app with flutter

I want to create a flutter application that saves the states so that my application can work offline. I use the BLoC pattern with flutter_bloc to manadge my states. I would also like to make sure that when my application becomes online the changes made are synchronized with the server that hosts the database

U can use Hydrated to persist urs streams: https://pub.dartlang.org/packages/hydrated

Second choise is use a Sqlite: https://pub.dartlang.org/packages/moor_flutter

I choose "moor" lib cuz make my Sqlite reactive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM