Fixed issues for using with the latest dart.

Creating a list with a size will have fixed size.
"reduce" got replaced with "fold"