使用sqlite flutter应用程序导入数据库 [英] Importing a database using sqlite, flutter app

查看:432
本文介绍了使用sqlite flutter应用程序导入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的主要目标是使用sqlite(sqlflite插件)将数据库导入flutter应用程序,而不必将所有创建表硬编码到应用程序代码中.

My main goal is to import a database into a flutter app using sqlite(sqlflite plugin), instead of having to hard code all of the create tables into the apps code.

*我希望信息可以在本地通过电话访问(通过飞行模式从电话访问数据),这就是我使用sqlite的原因

*I want the information to be accessed to the phone locally(access data from phone on airplane mode) that is why i am using sqlite

我在网上查找有关此信息的麻烦,并且正在查看是否有人有这样做的经验,或者是否有可以提供帮助的文档/示例.

I am having trouble finding information on this online and was seeing if anyone had experience in doing this or has documentation/examples that could help.

推荐答案

我认为您正在寻找: 打开资产数据库,在这种情况下,您必须具有数据库已经存在,您不需要创建表

i think you are looking for this : Open an asset database in this case you must have the database already and you don't need to create tables

这篇关于使用sqlite flutter应用程序导入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆