使用flutter开发,引用第三方库Fluttertoast,在HarmonyOS设备无法显示。代码如下:
Fluttertoast.showToast(
msg: msg,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: 1,
backgroundColor: const Color(0xFF000000),
textColor: Colors.white,
fontSize: 16,
webPosition: "center"
);
可以参考该demo示例:https://gitee.com/openharmony-sig/flutter\_fluttertoast/tree/master/example