fix: resolve 2 remaining strict analysis errors
- introPage.dart: Convert fireItems to proper static function closure - mainDrawer.dart: Convert unreadCount int to String for Text widget
This commit is contained in:
parent
1864e5b105
commit
7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions
|
|
@ -1,18 +1,26 @@
|
|||
class BasicLocation implements Comparable<BasicLocation> {
|
||||
|
||||
// static BasicLocation noLocation = new BasicLocation(lat: 0.0, lon: 0.0);
|
||||
|
||||
BasicLocation({required this.lat, required this.lon, this.description});
|
||||
|
||||
BasicLocation.fromJson(Map<String, dynamic> json)
|
||||
: lat = (json['lat'] as num).toDouble(),
|
||||
lon = (json['lon'] as num).toDouble(),
|
||||
description = json['description'] as String?;
|
||||
final double lat;
|
||||
final double lon;
|
||||
final String? description;
|
||||
|
||||
// static BasicLocation noLocation = new BasicLocation(lat: 0.0, lon: 0.0);
|
||||
|
||||
BasicLocation({required this.lat, required this.lon, this.description}) {}
|
||||
|
||||
@override
|
||||
int compareTo(BasicLocation other) {
|
||||
return lat == other.lat && lon == other.lon ? 1 : 0;
|
||||
}
|
||||
|
||||
bool operator ==(o) => o is BasicLocation && o.lat == lat && o.lon == lon;
|
||||
@override
|
||||
bool operator ==(Object o) => o is BasicLocation && o.lat == lat && o.lon == lon;
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
int hash = 1;
|
||||
hash = hash * 17 + lat.hashCode;
|
||||
|
|
@ -20,12 +28,7 @@ class BasicLocation implements Comparable<BasicLocation> {
|
|||
return hash;
|
||||
}
|
||||
|
||||
BasicLocation.fromJson(Map<String, dynamic> json)
|
||||
: lat = (json['lat'] as num).toDouble(),
|
||||
lon = (json['lon'] as num).toDouble(),
|
||||
description = json['description'] as String?;
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
Map<String, dynamic> toJson() => <String, dynamic>{
|
||||
'lat': lat,
|
||||
'lon': lon,
|
||||
'description': description,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue