Override findAll Adapter

In this example we completely override findAll to return random models:

mixin FindAllAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
  @override
  Future<List<T>> findAll({
    bool? remote,
    Map<String, dynamic>? params,
    Map<String, String>? headers,
    bool? syncLocal,
    OnDataError<List<T>>? onError,
  }) async {
    // could use: super.findAll();
    return _generateRandomModels<T>();
  }
}

Need professional help with Flutter?

Describe your project in detail and include your e-mail and budget.