小编Nad*_*dou的帖子

未为类型“_MyAppState”定义方法“getApplicationDocumentsDirectory”

所以我的代码的一部分是


 Future<void> _loadModel() async {
    final bytes =
        await rootBundle.load('assets/deepspeech-0.9.3-models.tflite');
    final directory = (await getApplicationDocumentsDirectory()).path;

Run Code Online (Sandbox Code Playgroud)

我不断收到错误:

The method 'getApplicationDocumentsDirectory' isn't defined for the type '_MyAppState'.
Try correcting the name to the name of an existing method, or defining a method named 'getApplicationDocumentsDirectory'
Run Code Online (Sandbox Code Playgroud)

我应该怎么办?请帮帮我!

methods dart flutter

7
推荐指数
2
解决办法
7176
查看次数

标签 统计

dart ×1

flutter ×1

methods ×1