我用来Get.snackbar()显示连接到 API 的过程。\n我不明白如何以编程方式关闭小吃栏?\n我有以下代码:
@override\n Future<List> getImportantData(String inputData) async {\n try {\n final token = basicApiAuthString;\n print("requesting API with the following request: $inputData");\n Get.snackbar(\n "Requesting very important data...",\n "",\n duration: 60.seconds, // it could be any reasonable time, but I set it lo-o-ong\n snackPosition: SnackPosition.BOTTOM,\n showProgressIndicator: true,\n isDismissible: true,\n backgroundColor: Colors.lightGreen,\n colorText: Colors.white,\n );\n List importantData = await _client.requestAPI(basicAuthString: token, body: inputData);\n .then((importantData) {\n // Here I need to dismiss the snackbar I am still showing to user\n …Run Code Online (Sandbox Code Playgroud)