Line data Source code
1 : // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 2 : // for details. All rights reserved. Use of this source code is governed by a 3 : // BSD-style license that can be found in the LICENSE file. 4 : 5 : /// A class that's used as a default argument to detect whether an argument was 6 : /// passed. 7 : /// 8 : /// We use a custom class for this rather than just `const Object()` so that 9 : /// callers can't accidentally pass the placeholder value. 10 : class _Placeholder { 11 11 : const _Placeholder(); 12 : } 13 : 14 : /// A placeholder to use as a default argument value to detect whether an 15 : /// argument was passed. 16 : const placeholder = _Placeholder();