dart then method code example Example: dart then method myFunc().then(processValue) .catchError(handleError);