Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kb0 committed Jul 26, 2020
1 parent 084cc36 commit 2379117
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.0.1+1]

* fix formatting

## [1.0.1]

* fix kml writer for empty metadata
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In your dart/flutter project add the dependency:
```
dependencies:
...
gpx: ^1.0.0
gpx: ^1.0.1+1
```

### Reading XML
Expand Down
18 changes: 9 additions & 9 deletions lib/src/kml_writer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ class KmlWriter {
}

builder.element(KmlTagV22.extendedData, nest: () {
_writeExtendedElement(builder, GpxTagV11.keywords, metadata.keywords);
_writeExtendedElement(builder, GpxTagV11.keywords, metadata.keywords);

if (metadata.time != null) {
_writeExtendedElement(
builder, GpxTagV11.time, metadata.time.toIso8601String());
}
if (metadata.time != null) {
_writeExtendedElement(
builder, GpxTagV11.time, metadata.time.toIso8601String());
}

if (metadata.copyright != null) {
_writeExtendedElement(builder, GpxTagV11.copyright,
'${metadata.copyright.author}, ${metadata.copyright.year}');
}
if (metadata.copyright != null) {
_writeExtendedElement(builder, GpxTagV11.copyright,
'${metadata.copyright.author}, ${metadata.copyright.year}');
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: gpx
description: Package for load, manipulate, and save GPS data in GPX format (a light-weight XML data format for the interchange of GPS data - waypoints, routes, and tracks).
version: 1.0.1
version: 1.0.1+1
homepage: https://github.com/kb0/dart-gpx/

environment:
Expand Down
3 changes: 2 additions & 1 deletion test/gpx_writer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ void main() {

test('write empty gpx with metadata', () async {
final gpx = createMinimalMetadataGPX();
final xml = await File('test/assets/minimal_with_metadata.gpx').readAsString();
final xml =
await File('test/assets/minimal_with_metadata.gpx').readAsString();

expectXml(GpxWriter().asString(gpx, pretty: true), xml);
});
Expand Down
3 changes: 2 additions & 1 deletion test/kml_writer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void main() {

test('write empty kml with metadata', () async {
final gpx = createMinimalMetadataGPX();
final xml = await File('test/assets/minimal_with_metadata.kml').readAsString();
final xml =
await File('test/assets/minimal_with_metadata.kml').readAsString();

expectXml(KmlWriter().asString(gpx, pretty: true), xml);
});
Expand Down

0 comments on commit 2379117

Please sign in to comment.