getModels static method

Future<List<Map<String, dynamic>>?> getModels(
  1. String table
)

Implementation

static Future<List<Map<String, dynamic>>?> getModels(String table) async {
  try {
    String key = 'database_table_$table';

    return compute(getDatabaseModels, {
      'table': table,
      'data': getSharedPreferences().getStringList(key) ?? [],
    });
  } catch (e) {
    print(e);
  }

  return null;
}