boolArgument method

bool? boolArgument(
  1. String? argKey
)

bool类型参数, 尝试解析, 无法解析时返回null

  • 对于int类型, 非0都是true
  • 对于String类型, 'true' 是true(无视大小写)

Implementation

bool? boolArgument(String? argKey) {
  final arg = argument(argKey);
  if (arg == null) {
    return null;
  }
  return CommonUtil.boolValue(arg);
}