【问题标题】:Facing a problem to set up the emulator in flutter在 flutter 中设置模拟器时遇到问题
【发布时间】:2023-02-13 22:27:36
【问题描述】:

我有以下问题......

Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
   int _counter = 0;dsggfsgfh;
                    ^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

我是 Flutter 的初学者。我怎么解决这个问题?

【问题讨论】:

    标签: flutter dart


    【解决方案1】:

    你可以有这样的东西:

    int x = 1;
    var y;
    double myDouble = 1.0;
    

    请查看language tour

    【讨论】:

      猜你喜欢
      • 2011-08-06
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 2012-10-10
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 2015-06-21
      相关资源
      最近更新 更多