Posts

Showing posts from July, 2019

Top 10 Function that puzzle developers new to Flutter (Darts)

Dollar sign ($)  -  $string1/{exp1} Putting a  dollar syntax/sign in front of a variable or expression would tell compiler to look at value of var/exp.  In essence,  String Interpolation. e.g. Input: String food1 = "Burger" String food2 = "sushi" print('My favourite food1 is $food and ${food2.upper()}'); Output: Burger SUSHI Cascade Notation  (..) Been seeing methods with double dots preceding e.g. ..add()/..remove() lurking around and can't figure out whether it is deliberate or typo.  Fret not, its not a typo. Cascade notation allows you to combine multiple method of the same class in an expression without repeating the classname/prefix. i.e. chain methods Example below: myTable.add("Name"); myTable.add("Address"); myTable.add("Mobile"); myTable.remove("Fax"); Cascade Notation: myTable..add("Name")..add("Address")..add("Mobile")..remove(...