asString property Null safety

String asString

Asserts that value exists and is a string and returns it.

asStringOr may be used to provide a default value instead of rejecting the request if value doesn't exist.

Implementation

String get asString => _getTyped('a string', (value) => value is String);