editeRow static method

dynamic editeRow(
  1. int i,
  2. Map map
)

Implementation

static editeRow(int i, Map map) async {
  String reading = await read();
  if (reading.isNotEmpty) {
    Map maps = jsonDecode(reading);
    int key = maps['data']['data'][i]['key'];
    map['key'] = key;
    maps['data']['data'][i] = map;
    String toS = jsonEncode(maps);
    write(toS);
  }
}