compareWithPath method Null safety

String compareWithPath(
  1. String path
)

Implementation

String compareWithPath(String path) {
  final declarationFile = File(path);
  if (!declarationFile.existsSync()) {
    return declarations.createTables();
  }
  final jtext = declarationFile.readAsStringSync();
  final defineMap = jsonDecode(jtext);
  final currentDeclaration = Declarations.fromMap(defineMap);
  return compareTo(currentDeclaration);
}