Positional parameters

Positional parameters

String say(String from, String msg, [String device]) { 
   var result = '$from says $msg'; 
   if (device != null) { 
      result = '$result with a $device'; 
   } 
   return result; 
}

Wrapping a set of function parameters in [] marks them as optional positional parameters.

Related concepts

Positional parameters — Structure map

Clickable & Draggable!

Positional parameters — Related pages: