Created
July 9, 2020 21:41
-
-
Save blaugold/7209ee3eb710dbf713f1624990e3d61e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
void withAssert() { | |
assert(() { | |
runConditionalCode(); | |
return true; | |
}); | |
} | |
void withEnvironmentFlag() { | |
if (kDebugMode) runConditionalCode(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment