In Flutter/Dart the examples sometimes show fat arrow and sometimes dont. Here are examples:
RaisedButton(
onPressed: () {
setState(() {
_myTxt = \"
=>
is used to return a value of an anonymous function.
() {}
lets you execute multiple statements.
while
() => {myVar}
or () => myVar;
allows one single statement.
() => myVar;
is short and simple when returning one statement.
The same logic goes for creating non anonymous functions too.
Single statement func
func() => y = x + x;
Multiple statement func
func () {
x = x + x;
print(x + ' value of x');
};