findValue method

Map findValue({
  1. required List list,
  2. required int value,
})

Implementation

Map findValue({required List list, required int value}) {
  return list.firstWhere((element) => element['value'] == value,
      orElse: () => {});
}