toDartList method

List<Object> toDartList({
  1. Object convertOther(
    1. ObjCObject
    ) = _defaultDartConverter,
})

Deep converts this NSArray to a Dart List.

This creates a new List, converts all the NSArray elements, and adds them to the List. If you only need iteration and element access, asDart is much more efficient.

Implementation

List<Object> toDartList({
  Object Function(ObjCObject) convertOther = _defaultDartConverter,
}) =>
    asDart().map((o) => toDartObject(o, convertOther: convertOther)).toList();