flutter判断app是否为debug或者release模式

  • debug模式:
import 'package:flutter/foundation.dart';
static bool _debug = kDebugMode;	//constant下的一个常量
  • release模式:
import 'package:flutter/foundation.dart';
static bool _release = kReleaseMode;	//constant下的一个常量

还有一种是profile模式,具体自行看源代码。

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2022-03-05
  • 2022-03-02
  • 2021-06-13
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案