String padText(String s, int amount) { return s .replaceAll(RegExp(r'^', multiLine: true), ''.padLeft(amount)) .trimLeft(); }