addResourceToRecap static method

Map<String, dynamic> addResourceToRecap({
  1. required Map<String, dynamic> recap,
  2. required String resource,
  3. required Map<String, dynamic> actions,
})

Implementation

static Map<String, dynamic> addResourceToRecap({
  required Map<String, dynamic> recap,
  required String resource,
  required Map<String, dynamic> actions,
}) {
  //
  final sortedRecap = Map<String, dynamic>.from(recap);
  sortedRecap['att']![resource] = actions;
  sortedRecap.keys.toList().sort((a, b) => a.compareTo(b));
  isValidRecap(sortedRecap);
  return sortedRecap;
}