Spec-Zone.ru › Dart 2

dart:core

checkNotNull<@Since("2.8") T> static method

  1. @Since("2.1")
T checkNotNull<@Since("2.8") T>(
  1. T? argument,
  2. [String? name]
)

Throws if argument is null.

If name is supplied, it is used as the parameter name in the error message.

Returns the argument if it is not null.

Implementation

@Since("2.1")
static T checkNotNull<@Since("2.8") T>(T? argument, [String? name]) =>
    argument ?? (throw ArgumentError.notNull(name));

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/ArgumentError/checkNotNull.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API