Dart如何访问文件映射数据

时间:2018-11-27 03:41:06

标签: json dart directory

因此,我已成功将键和值的映射存储到json文件中。我现在正在尝试读取json文件,以便将其转换为对象,但是无法重新获得这些键和值。

Json文件:

{"frc1":"1","frc4":"4","frc5":"5","frc6":"6","frc7":"7","frc8":"8","frc9":"9","frc10":"10","frc11":"11","frc13":"13","frc14":"14","frc15":"15","frc16":"16","frc17":"17","frc18":"18","frc19":"19","frc20":"20","frc21":"21","frc22":"22","frc23":"23","frc24":"24","frc25":"25"}

我了解我需要像下面那样访问文件,但不知道要去哪里。

  Future<List<Team>> readTeams(String query) async {
        try {
    final file = await _localFile;
....
}

0 个答案:

没有答案