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

Flutter Null Context

I'm getting the following message when trying to display a message to the user [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 Navigator.of (package:flutter/src/widgets/navigator.dart:2794) #1 showDialog (package:flutter/src/material/dialog.dart:1425) #2 _MyAppState.showMessage (package:simple_sensor_test/main.dart:397) #3 _MyAppState.valueChange (package:simple_sensor_test/main.dart:101) #4 _MyAppState.myField.<anonymous closure>…

VIEW QUESTION

Flutter not working after installing shared_preferences

After installing shared_preferences, my app is not working. Im getting this error: `FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':shared_preferences_android:compileDebugJavaWithJavac'. Could not resolve all files for configuration ':shared_preferences_android:androidJdkImage'. Failed to transform core-for-system-modules.jar to match…

VIEW QUESTION
Back To Top
Search