isDataOnlyNewLines function

bool isDataOnlyNewLines(
  1. Object data
)

Implementation

bool isDataOnlyNewLines(Object data) {
  if (data is! String || data.isEmpty) return false;
  return RegExp('^(\n)+\$').hasMatch(data);
}