loadXcStringsFile method

Map<String, dynamic> loadXcStringsFile(
  1. File xcstringsFile,
  2. String source
)

Loads the existing xcstrings file or creates a new structure if it doesn't exist.

Implementation

Map<String, dynamic> loadXcStringsFile(File xcstringsFile, String source) {
  return xcstringsFile.existsSync()
      ? jsonDecode(xcstringsFile.readAsStringSync())
      : {
          "sourceLanguage": source,
          'strings': {},
          "version": "1.0",
        };
}