isTxt method Null safety

bool isTxt(
  1. String filePath
)

Checks if string is an txt file.

Implementation

static bool isTxt(String filePath) {
  return filePath.toLowerCase().endsWith(".txt");
}