Flutter的四种运行模式:Debug、Release、Profile和test
Flutter中如何判断当前运行模式是Debug还是Product?
- 判断当前运行环境
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
当App运行在Release环境时,inProduction为true;当App运行在Debug和Profile环境时,inProduction为false。
Flutter的四种运行模式:Debug、Release、Profile和test
Flutter中如何判断当前运行模式是Debug还是Product?
const bool inProduction = const bool.fromEnvironment("dart.vm.product");