weight method

FontWeight? weight(
  1. dynamic id
)

Implementation

FontWeight? weight(dynamic id) {
  if(id == null ) {
    return null;
  }
  if(id is FontWeight) {
    return id;
  }
  final val = value(id);
  var result;
  if(val is FontWeight) {
    result = val;
  } else {
    _throwUnsupportedType(id, val);
  }
  return result;
}