diff --git a/lib/main.dart b/lib/main.dart index 5aea23b1..c2f4b4ba 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,8 @@ import 'package:aku_community/utils/developer_util.dart'; import 'package:aku_community/utils/headers.dart'; void main() async { - DeveloperUtil.setDev(true); + const buildType = const String.fromEnvironment('BUILD_TYPE'); + DeveloperUtil.setDev(!(buildType.contains('PRODUCT'))); WidgetsFlutterBinding.ensureInitialized(); ///firebase crashlytics initalize diff --git a/tool/grind.dart b/tool/grind.dart index 35be28bf..e2261420 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -13,6 +13,8 @@ buildApk() async { 'build', 'apk', '--target-platform=android-arm64', + '--dart-define', + 'BUILD_TYPE=PRODUCT', ], ); } @@ -24,6 +26,8 @@ buildIos() async { arguments: [ 'build', 'ios', + '--dart-define', + 'BUILD_TYPE=PRODUCT', ], ); }