Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

use null safe versions of dependencies #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:geopoint/geopoint.dart';
import 'package:latlong/latlong.dart';
import 'package:latlong2/latlong.dart';

class Place {
Place(this.name, this.point);
Expand Down
12 changes: 5 additions & 7 deletions lib/src/models/geopoint.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'dart:io';

import 'package:latlong/latlong.dart';
import 'package:latlong2/latlong.dart';
import 'package:meta/meta.dart';
import 'package:slugify2/slugify.dart';

var _slugify = Slugify();
import 'package:slugify/slugify.dart';

/// A class to hold geopoint data structure
class GeoPoint {
Expand Down Expand Up @@ -32,7 +30,7 @@ class GeoPoint {
this.images})
: assert(latitude != null),
assert(longitude != null) {
if (slug == null && name != null) slug = _slugify.slugify(name);
if (slug == null && name != null) slug = slugify(name);
}

/// The name of the geopoint
Expand Down Expand Up @@ -123,7 +121,7 @@ class GeoPoint {
region = "${json["region"]}",
country = "${json["country"]}" {
if (slug == null && name != null) {
slug = _slugify.slugify("${json["name"]}");
slug = slugify("${json["name"]}");
}
}

Expand All @@ -134,7 +132,7 @@ class GeoPoint {
GeoPoint.fromLatLng({@required LatLng point, this.name})
: latitude = point.latitude,
longitude = point.longitude {
if (name != null) slug = _slugify.slugify(name);
if (name != null) slug = slugify(name);
}

/// Get a json map from this geopoint
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/geoserie.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';

import 'package:latlong/latlong.dart';
import 'package:latlong2/latlong.dart';
import 'package:meta/meta.dart';
import 'geopoint.dart';

Expand Down
12 changes: 6 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ homepage: https://github.com/synw/geopoint
version: 0.8.0

environment:
sdk: ">=2.3.0 <3.0.0"
sdk: '>=2.3.0 <3.0.0'

dependencies:
extra_pedantic: ^1.2.0
latlong: ^0.6.1
meta: ^1.1.8
pedantic: ^1.9.2
slugify2: ^0.2.1
extra_pedantic: ^1.5.0
latlong2: ^0.8.0
meta: ^1.4.0
pedantic: ^1.11.0
slugify: ^2.0.0

dev_dependencies:
test: ^1.6.5
Expand Down