getById method

  1. @override
Future<T?> getById(
  1. String? id, [
  2. Map? args
])
override

Implementation

@override
Future<T?> getById(String? id, [Map? args]) {
  return (apiSource as GetByIdApiSource<T>)
      .getById(id, args)
      .then((result) async {
    if (result != null) {
      await (dbSource as PutDbSource<T>).put(result, args);
    }
    return result;
  });
}