How to get an array of all the child elements using Dart Language?

dart, dart-editor, dart-webui

Solution

Quick n dirty:

var carousel = query(".carousel");
var classList = [];
carousel.children.forEach((childElement) => classList.addAll(childElement.classes));
print(classList); // [galleryCars,galleryCars2,galleryCars3,galleryCars4]

Problem

How to get the class names of the child elements of the class carousel in dart in the form of an array?? ``` <div class="carousel"> <div class="galleryCars"> .... </div> <div class="galleryCars2"> .... </div> <div class="galleryCars3"> .... </div> <div class="galleryCars4"> .... </div> </div> ```

Original source