Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
kelryazevedo committed Jan 10, 2024
1 parent 597e893 commit a69fb56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 45 deletions.
12 changes: 1 addition & 11 deletions packages/atlas/lib/src/lat_lng.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/// A pair of latitude and longitude coordinates.
/// The `latitude` and `longitude` are stored as degrees.
import 'package:equatable/equatable.dart';
class LatLng extends Equatable {
class LatLng {
/// The latitude in degrees between -90.0 and 90.0, both inclusive.
final double latitude;

Expand All @@ -28,13 +27,4 @@ class LatLng extends Equatable {

@override
int get hashCode => latitude.hashCode ^ longitude.hashCode;

@override
List<Object?> get props => [
latitude,
longitude,
];

@override
bool get stringify => true;
}
35 changes: 1 addition & 34 deletions packages/atlas/lib/src/polyline.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'package:atlas/atlas.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:equatable/equatable.dart';

/// A `Polyline` made up of multiple points on the map
class Polyline extends Equatable {
class Polyline {
/// Uniquely identifies a `Polyline`.
final String id;

Expand Down Expand Up @@ -83,36 +82,4 @@ class Polyline extends Equatable {
return false;
}
}

@override
int get hashCode =>
id.hashCode ^
points.hashCode ^
onTap.hashCode ^
color.hashCode ^
width.hashCode ^
outlineColor.hashCode ^
isDottedLine.hashCode ^
outlineWidth.hashCode ^
intervals.hashCode ^
zIndex.hashCode ^
congestionLevel.hashCode;

@override
List<Object?> get props => [
id,
points,
onTap,
color,
width,
outlineColor,
isDottedLine,
outlineWidth,
intervals,
zIndex,
congestionLevel,
];

@override
bool get stringify => true;
}

0 comments on commit a69fb56

Please sign in to comment.