From 355d4489810b8b9434394382b0d6495e04b0f20b Mon Sep 17 00:00:00 2001 From: Kirill Bychkov Date: Mon, 15 Jan 2024 16:37:41 +0300 Subject: [PATCH] release 2.2.2 - fix no-element exception when href is absent - update lints --- CHANGELOG.md | 5 +++++ README.md | 2 +- analysis_options.yaml | 3 +-- lib/src/gpx_reader.dart | 4 ++-- lib/src/model/kml_tag.dart | 1 - pubspec.yaml | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f844fcb..2dfc20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [2.2.2] + +* fix no-element exception when href is absent +* update lints + ## [2.2.1] * fixed missed symbol during writing diff --git a/README.md b/README.md index 7ccbe8e..04ffe2f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ In your dart/flutter project add the dependency: ``` dependencies: ... - gpx: ^2.2.1 + gpx: ^2.2.2 ``` ### Reading XML diff --git a/analysis_options.yaml b/analysis_options.yaml index 894e77a..cb89010 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -57,12 +57,11 @@ linter: - hash_and_equals - implementation_imports - invariant_booleans - - iterable_contains_unrelated_type + - collection_methods_unrelated_type - join_return_with_assignment - library_names - library_prefixes - lines_longer_than_80_chars - - list_remove_unrelated_type - literal_only_boolean_expressions - no_adjacent_strings_in_list - no_duplicate_case_values diff --git a/lib/src/gpx_reader.dart b/lib/src/gpx_reader.dart index b2b2242..caaab20 100644 --- a/lib/src/gpx_reader.dart +++ b/lib/src/gpx_reader.dart @@ -364,11 +364,11 @@ class GpxReader { final val = iterator.current; if (val is XmlTextEvent) { - string += val.text; + string += val.value; } if (val is XmlCDATAEvent) { - string += val.text; + string += val.value; } if (val is XmlEndElementEvent && val.name == tagName) { diff --git a/lib/src/model/kml_tag.dart b/lib/src/model/kml_tag.dart index b6efe96..c7188df 100644 --- a/lib/src/model/kml_tag.dart +++ b/lib/src/model/kml_tag.dart @@ -25,5 +25,4 @@ class KmlTagV22 { static const when = 'when'; // absolute - } diff --git a/pubspec.yaml b/pubspec.yaml index 04c4e76..8b1531a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: 2.2.1 +version: 2.2.2 homepage: https://github.com/kb0/dart-gpx/ environment: @@ -12,5 +12,5 @@ dependencies: xml: '^6.1.0' dev_dependencies: - lints: ^2.0.0 + lints: ^3.0.0 test: ^1.21.0