isEmptyLine method

bool isEmptyLine(
  1. Operation? before,
  2. Operation after
)

Implementation

bool isEmptyLine(Operation? before, Operation after) {
  final textBefore = before?.data is String ? before!.data as String? : '';
  final textAfter = after.data is String ? after.data as String? : '';
  return (before == null || textBefore!.endsWith('\n')) &&
      textAfter!.startsWith('\n');
}