getRecapResource static method

List<String> getRecapResource({
  1. required Map<String, dynamic> recap,
  2. required String resource,
})

Implementation

static List<String> getRecapResource({
  required Map<String, dynamic> recap,
  required String resource,
}) {
  try {
    final att = recap['att'] as Map<String, dynamic>?;
    final abilities = att?[resource] as Map<String, dynamic>?;
    if (abilities != null) {
      return abilities.keys.toList();
    }
  } catch (e) {
    debugPrint(e.toString());
  }
  return [];
}