encode method

String encode()

The file's text: indented JSON with a newline at the end.

Implementation

String encode() =>
    '${const JsonEncoder.withIndent('  ').convert(toJson())}\n';