get method

Future<List<Map<String, dynamic>>> get({
  1. dynamic query,
})

Implementation

Future<List<Map<String, dynamic>>> get({
  query,
}) async {
  List<Map<String, dynamic>> list = await database!.rawQuery(
    query,
  );
  List<Map<String, dynamic>> lists = [];
  for (var i in list) {
    Map<String, dynamic> map = {};
    i.forEach((key, value) {
      if (value is String) {
        value = value.replaceAll('|_|_|', "'").replaceAll('|-|-|', '"');
        map.addAll({key: value});
      } else {
        map.addAll({key: value});
      }
    });
    lists.add(map);
  }
  return lists;
}