getAll method

Future<List<NewModel>> getAll()

Implementation

Future<List<NewModel>> getAll() async {
  await _ready();

  List<Map> maps = await _NewModelDb.query('NewModel');
  List<NewModel> result = [];

  if (maps.isNotEmpty) {
    for (var element in maps) {
      result.add(NewModel.fromMap(element));
    }
    return result;
  }
  return [];
}