requireString method

String requireString(
  1. String name, {
  2. String? from,
})

Implementation

String requireString(String name, {String? from}) {
  final e = require(name);
  if (e is! String) {
    throw ChalonaResponse.error('data-type-required',
        {'param': name, 'from': from, 'type': 'String'});
  }
  return e;
}