to_array function

List to_array(
  1. dynamic coll$1
)

Implementation

dc.List to_array(dc.dynamic coll$1, ){
if((coll$1 is dc.List)){
return ((coll$1 as dc.List).toList(growable: false, ));
}
final dc.dynamic coll7677$1=coll$1;
late final dc.int length$1;
if((coll7677$1 is lcoc_core.ICounted$iface)){
length$1=(((coll7677$1 as lcoc_core.ICounted$iface).$_count$0()) as dc.int);
}else{
length$1=(((lcoc_core.ICounted.extensions(coll7677$1, ) as lcoc_core.ICounted$ext).$_count$0(coll7677$1, )) as dc.int);
}
final dc.List<dc.dynamic> ary$1=(dc.List.filled(length$1, null, ));
final dc.dynamic o7603$1=coll$1;
dc.dynamic s$1;
if((o7603$1 is lcoc_core.ISeqable$iface)){
s$1=((o7603$1 as lcoc_core.ISeqable$iface).$_seq$0());
}else{
s$1=((lcoc_core.ISeqable.extensions(o7603$1, ) as lcoc_core.ISeqable$ext).$_seq$0(o7603$1, ));
}
dc.int idx$1=0;
do {
if((null==s$1)){
return ary$1;
}
final dc.dynamic v$8086_$AUTO_$1=lcoc_core.first(s$1, );
ary$1[idx$1]=v$8086_$AUTO_$1;
s$1=lcoc_core.next(s$1, );
idx$1=(1+idx$1);
continue;
} while(true);
}