get method

Future<List<T>> get({
  1. Dio? dioTestClient,
  2. bool? online,
})

Implementation

Future<List<T>> get({Dio? dioTestClient, bool? online}) async {
  if (online == true) {
    return this.fetchOnline(dioTestClient: dioTestClient);
  }

  if (this.id != null) {
    return this.repository.find(
        id: this.id,
        fields: this.fields as List<String>,
        database: this.database,
        relations: this.relations) as Future<List<T>>;
  }

  return this.repository.findAll(
      database: this.database,
      filters: this.filters,
      fields: this.fields as List<String>,
      sortOrder: this.sortOrder,
      relations: this.relations) as Future<List<T>>;
}