incrementWidth property

String get incrementWidth

Determine width value, e.g. position inside a List.

Implementation

String get incrementWidth {
  final strWidth = currentKey.substring(
      currentKey.lastIndexOf(".") + 1, currentKey.length);
  final intWidth = int.parse(strWidth) + 1;
  final prefix = currentKey.substring(0, currentKey.lastIndexOf("."));
  return currentKey = "$prefix.$intWidth";
}