0
点赞
收藏
分享

微信扫一扫

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

工程与房产肖律师 2022-05-16 阅读 80

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模式,具体自行看源代码。




举报

相关推荐

0 条评论