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
There's currently a workaround implemented which comments out spread elements in list literal initializers. However, the spread operator is used extensively throughout Flutter and it needs to be fully implemented.
I'm going to hazard a guess that we'll want to implement two versions of the list literal processor - one for list literals without spread and one with spread, in case the C# implementation with spread has some runtime overhead that we could avoid if there's no spread operator in a literal.
I think the C# implementation of the spread will be to use a helper function that constructs the list, instead of a new expression. Something along these lines:
// Original Dart code: return <string>['item 1', ...spreadOperand];returnDartUtils.MakeListWithSpreads<string>(list =>{list.Add('item 1');foreach(variinspreadOperand){list.Add(i);}});
The text was updated successfully, but these errors were encountered:
There's currently a workaround implemented which comments out spread elements in list literal initializers. However, the spread operator is used extensively throughout Flutter and it needs to be fully implemented.
I'm going to hazard a guess that we'll want to implement two versions of the list literal processor - one for list literals without spread and one with spread, in case the C# implementation with spread has some runtime overhead that we could avoid if there's no spread operator in a literal.
I think the C# implementation of the spread will be to use a helper function that constructs the list, instead of a
new
expression. Something along these lines:The text was updated successfully, but these errors were encountered: