fetch method

Future<void> fetch(
  1. List<Property> properties,
  2. Map<String, dynamic>? user_data
)

Implementation

Future<void> fetch (
    List<Property> properties,
    Map<String, dynamic>? user_data,
) async {
  if (isDirty() == false)
    return;

  if (isFetching() == true) {
    while (isFetching() == true)
      await Future.delayed(Duration(milliseconds: 100));
    return;
  }

  startFetch();
  await onFetch(properties.where((e)=>e.is_dirty == true).toList(), user_data);
  endFetch();
}