updateAsync method

Future<void> updateAsync(
  1. Future<T> asyncUpdater(
    1. T current
    )
)

Cập nhật bất đồng bộ (ví dụ gọi API rồi gán lại giá trị)

Implementation

Future<void> updateAsync(Future<T> Function(T current) asyncUpdater) async {
  value = await asyncUpdater(_value);
}