Open huskyjp opened 3 years ago
Widget error is like this - looks like response.data
is null
The following _CastError was thrown building StreamBuilder<OperationResponse<GFetchRecipeListData,
GFetchRecipeListVars>>(dirty, state: _StreamBuilderBaseState<OperationResponse<GFetchRecipeListData,
GFetchRecipeListVars>, AsyncSnapshot<OperationResponse<GFetchRecipeListData,
GFetchRecipeListVars>>>#55ca8):
Null check operator used on a null value
The relevant error-causing widget was:
StreamBuilder<OperationResponse<GFetchRecipeListData, GFetchRecipeListVars>>
file:///C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ferry_flutter-0.5.4/lib/src/operation.dart:47:12
Since I am using Dart2.0 and with null-safety, it always crashes at recipes!isEmpty
.
final recipes = response.data?.recipes;
if (recipes!.isEmpty) {
return _buildNoRecipes(context);
}
I am not able to send a POST request to Hasura both on simply from
docker-compose
setup andHeroku
as instructed in the tutorial. Whenever I send a request, it returns error like below even from a Postman.{"errors":[{"extensions":{"path":"$","code":"invalid-json"},"message":"Error in $: not enough input"}]}
I currently have same logic Client on Flutter using ferry like this - any idea why Hasura denies access? ( I guess I need to add some additional header?)
P.S. Thanks for the nice tutorial on Youtube!