updateItemDatasource method

void updateItemDatasource(
  1. bool satisfied(
    1. dynamic e
    ), {
  2. ValueChanged? updated,
})

update an value contained inside datasource

Implementation

void updateItemDatasource(bool Function(dynamic e) satisfied,
    {ValueChanged<dynamic>? updated}) {
  try {
    final item = datasource.firstWhere(satisfied);
    updated?.call(item);
    datasource.refresh();
  } on StateError catch (error) {
    print('updateItemDatasource:StateError: ${error.message}');
  }
}