run app with dart-define

hmxc
小赖 4 years ago
parent bc57b41fa7
commit e2214be982

@ -17,7 +17,8 @@ import 'package:aku_community/utils/developer_util.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
void main() async { void main() async {
DeveloperUtil.setDev(true); const buildType = const String.fromEnvironment('BUILD_TYPE');
DeveloperUtil.setDev(!(buildType.contains('PRODUCT')));
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
///firebase crashlytics initalize ///firebase crashlytics initalize

@ -13,6 +13,8 @@ buildApk() async {
'build', 'build',
'apk', 'apk',
'--target-platform=android-arm64', '--target-platform=android-arm64',
'--dart-define',
'BUILD_TYPE=PRODUCT',
], ],
); );
} }
@ -24,6 +26,8 @@ buildIos() async {
arguments: [ arguments: [
'build', 'build',
'ios', 'ios',
'--dart-define',
'BUILD_TYPE=PRODUCT',
], ],
); );
} }

Loading…
Cancel
Save