Make a kReleaseMode constant that is public. (#27502)
Before this, we had several places where an isReleaseMode was defined, all with the same definition. This just makes it more broadly visible to allow our users to use it, as well as creating debug and profile versions, and adding a device lab test for it. Since this is a const value, this makes it possible for a developer to easily mark blocks that can be removed at AOT compile time.
This commit is contained in:
14
dev/integration_tests/ui/lib/build_mode.dart
Normal file
14
dev/integration_tests/ui/lib/build_mode.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2019 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
print('>>> Release: $kReleaseMode <<<');
|
||||
print('>>> FINISHED <<<');
|
||||
stdout.flush();
|
||||
runApp(const Text('Hello, world!', textDirection: TextDirection.ltr));
|
||||
}
|
||||
Reference in New Issue
Block a user