escapeIfNeeded function Null safety

String escapeIfNeeded(
  1. String s
)

Escapes s by wrapping it in backticks if it's an sqlite keyword.

Implementation

String escapeIfNeeded(String s) {
  if (isSqliteKeyword(s) || s.contains(_whitespace)) return '"$s"';
  return s;
}