You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to convert some code that was using method channels and did a map(_helperFunctionToConvertElements), and the corresponding code with FFI was a very old-school C-ish style loop-indexes-from-0-to-length-minus-one to manually both convert each element of the array, but also convert the NSArray to a List. If NSArray supported Iterable, then it would have been simple and idiomatic to do the conversion to FFI.
The text was updated successfully, but these errors were encountered:
(After filing this I realized that since I explicitly wanted a List in my use case I could make a helper utility that would convert the NSArray to a generic List and then do the rest of the conversions with Dart-idiomatic map operations, but having that built in to objective_c, especially for cases where someone just needs an Iterable and not a List, would be still be a good quality-of-life improvement.)
This is related to #1444, but broader in scope.
I wanted to convert some code that was using method channels and did a
map(_helperFunctionToConvertElements)
, and the corresponding code with FFI was a very old-school C-ish style loop-indexes-from-0-to-length-minus-one to manually both convert each element of the array, but also convert theNSArray
to aList
. IfNSArray
supportedIterable
, then it would have been simple and idiomatic to do the conversion to FFI.The text was updated successfully, but these errors were encountered: