我不明白then()
条款的语法.
1. myFuture(6).then( (erg) => print(erg) )
从句法上讲,(erg) => expr
是什么意思?
我以为这可能是个函数,但是
then( callHandler2(erg)
不起作用,错误:
"Multiple markers at this line
- The argument type 'void' cannot be assigned to the parameter type '(String) ->
dynamic'
- Undefined name 'erg'
- Expected to find ')'"
2. myFuture(5).then( (erg) { callHandler(erg);},
onError: (e) => print (e)
What´s `onError: (e) => expr"` syntactically?
3. onError:
和.catchError(e)
的变种有什么不同吗?