get method Null safety

  1. @override
dynamic get(
  1. String? id,
  2. {dynamic onError(
    1. Exception
    )?}
)
override

Implementation

@override
Future<SectionModel> get(String? id, {Function(Exception)? onError}) {
  int index = _index(id!);
  var completer = Completer<SectionModel>();
  completer.complete(items[index]);
  return completer.future;
}