getValue method

num getValue (
  1. String s
)

Implementation

num getValue(String s) {
  switch (type) {
    case 'int':
      return int.parse(s);
    case 'double':
      return double.parse(s);
    default:
      return num.parse(s);
  }
}