Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

two dots dart

.. is known as cascade notation. 
It allows you to not repeat the same target if you want to call several methods on the same object.

List list = [];
list.add(color1);
list.add(color2);
list.add(color3);
list.add(color4);

// with cascade

List list = [];
list
  ..add(color1)
  ..add(color2)
  ..add(color3)
  ..add(color4);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dots #dart
ADD COMMENT
Topic
Name
3+3 =