floor icon indicating copy to clipboard operation
floor copied to clipboard

enhancement request: support dart without flutter

Open rivasdiaz opened this issue 3 years ago • 0 comments

floor has a dependency on flutter. It'll be great if it could offer a dart only dependency as it could be used in dart CLIs etc.

After checking the source code, most of it can be converted by replacing sqflite with sqflite_common and flutter_test with test. Only lib/sqflite_database_factory.dart has a real dependency on sqflite, using sqflite's db factory to connect everything together.

A solution would be to move floor code to floor_common (or floor_runtime), and floor would keep the flutter dependency and lib/floor_database_factory.dart as it is today, while a separate floor_common_ffi package would have a very similar structure but would only depend on sqflite_common_ffi (and floor_common) making it fully functional in dart only projects.

Thanks!

rivasdiaz avatar Feb 07 '22 05:02 rivasdiaz