Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 如何在颤振中存储大数据?_Dart_Flutter - Fatal编程技术网

Dart 如何在颤振中存储大数据?

Dart 如何在颤振中存储大数据?,dart,flutter,Dart,Flutter,我的应用程序需要大量数据才能离线显示在Flatter应用程序中。以前,我以列表格式存储所有数据,并通过它们循环显示应用程序中的项目,但这些数据变得非常巨大,超过1000行和100KB,所以我想知道这是好的还是有更有效的方法在应用程序中存储数据 列出我使用的格式: const List<String> summaries = [ "Lots of texts", "Another Lots of texts", // Lots of other large i

我的应用程序需要大量数据才能离线显示在Flatter应用程序中。以前,我以列表格式存储所有数据,并通过它们循环显示应用程序中的项目,但这些数据变得非常巨大,超过1000行和100KB,所以我想知道这是好的还是有更有效的方法在应用程序中存储数据

列出我使用的格式:

const List<String> summaries = [
    "Lots of texts",
    "Another Lots of texts",
     // Lots of other large items
]

const List QnA = [
  [
    {
      'question':'My question?',
      'answer':"""My Answer""",
    },
    {
      'question':'My question?',
      'answer':"""My Answer""",
    }
]
// Lots of list items
];

const列表摘要=[
“大量文本”,
“另一批文本”,
//很多其他的大项目
]
常数列表QnA=[
[
{
‘问题’:‘我的问题?’,
‘答案’:‘我的答案’,
},
{
‘问题’:‘我的问题?’,
‘答案’:‘我的答案’,
}
]
//很多列表项
];

谢谢大家!

我更喜欢将所有这些数据转换为json格式,并将其放在资产文件夹中进行解码

final data = rootBundle.loadString('assets/text_asset/data.json');

json.decode(data);

在你的应用程序中使用数据库-sqflite用于大数据他说的是预设数据…不是sqlite的东西..他在应用程序中添加大数据集。