skip to Main Content

Flutter – The body might complete normally, causing 'null' to be returned, but the return type, 'FutureOr<Response<dynamic>>'

Given the following Future<void> clipsAdd(int questionId) async { await _authenticatedRequest((options) async { final String uri = "$domain/clips/add?questionId=$questionId"; final response = await dio.post(uri, options: options); if (response.statusCode != 200) { throw Exception('Failed to process request: ${response.statusCode}'); } }); } I get…

VIEW QUESTION

How can I get a navigatorkey in Flutter App? not null

When I click on the notification on background, it doesn't redirect to the page I want. I checked, and navigatorkey.currentContext is null. (I'm using go_router, get_it, provider) I referred to the blog below. https://zzingonglog.tistory.com/40 https://zzingonglog.tistory.com/41 final navigatorKey = GlobalKey<NavigatorState>(); FlutterLocalNotificationsPlugin…

VIEW QUESTION
Back To Top
Search