This sample should have a ';' at the end of the .then line, both because it just looks weird without it (though I know why you did it that way) and because the text says that the error is unhandled. I think we just need to duplicate the code in the .dart file.