HelpDartSyntax class
Help with Dart syntax
Multiple if
(() {
/// your code here
}())
Spread Operator
- Can be used to return multiple widgets
if (Responsive.isDesktop()) ...[
Text('Desktop')
Text('Mode')
]
Cascade Notation
Prevents repeating target for several call methods on same object.
List list = [];
list.add(color1);
list.add(color2);
list
..add(color1)
..add(color2);
Arrow
=> expression,
/// is equivalent to
{return expression;},
Closure/Inline Functions
() => expression
/// is equivalent to
function () {
return expression
}
Anonymous Multiline Function
() {expression}
/// is equivalent to
function () {
return expression
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited