将您的JSON文件添加到
pubspec.yaml
assets: - assets/config.json
然后可以使用
rootBundle它加载
import 'dart:async' show Future;import 'package:flutter/services.dart' show rootBundle;Future<String> loadAsset() async { return await rootBundle.loadString('assets/config.json');}还请看一下完整的示例,
并进行查询以将您的JSON数据转换为LIST,然后您就有了很多搜索方法,例如where方法



