getNth method

String getNth(
  1. dynamic number,
  2. dynamic first,
  3. dynamic end
)

Implementation

String getNth(number, first, end) {
  number = '$number';
  var finalNumber = "";
  for (var i = first; i <= end; i++) {
    finalNumber = finalNumber + number[i];
  }
  return finalNumber;
}