Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class BuildMode {
- static final BuildModeType buildMode = () {
- if (const bool.fromEnvironment('dart.vm.product')) {
- return BuildModeType.release;
- }
- var result = BuildModeType.profile;
- assert(() {
- result = BuildModeType.debug;
- return true;
- }());
- return result;
- }();
- static final bool isDebug = buildMode == BuildModeType.debug;
- static final bool isNotDebug = !isDebug;
- static final bool isProfile = buildMode == BuildModeType.profile;
- static final bool isNotProfile = !isProfile;
- static final bool isRelease = buildMode == BuildModeType.release;
- static final bool isNotRelease = !isRelease;
- }
- enum BuildModeType {
- debug,
- profile,
- release,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement