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:
vjrj 2026-03-06 11:21:06 +01:00
parent 1864e5b105
commit 7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions

View file

@ -9,6 +9,19 @@ part 'fireNotification.g.dart';
@JsonSerializable(nullable: false)
class FireNotification {
FireNotification(
{required this.id,
required this.lat,
required this.lon,
required this.description,
required this.when,
required this.read,
required this.sealed,
required this.subsId});
factory FireNotification.fromJson(Map<String, dynamic> json) =>
_$FireNotificationFromJson(json);
@JsonKey(toJson: objectIdToJson, fromJson: objectIdFromJson)
ObjectId id;
final double lat;
@ -20,19 +33,6 @@ class FireNotification {
final ObjectId subsId;
final bool read;
factory FireNotification.fromJson(Map<String, dynamic> json) =>
_$FireNotificationFromJson(json);
FireNotification(
{required this.id,
required this.lat,
required this.lon,
required this.description,
required this.when,
required this.read,
required this.sealed,
required this.subsId}) {}
FireNotification copyWith(
{ObjectId? id,
double? lat,
@ -42,7 +42,7 @@ class FireNotification {
DateTime? when,
String? sealed,
ObjectId? subsId}) {
return new FireNotification(
return FireNotification(
id: id ?? this.id,
lat: lat ?? this.lat,
lon: lon ?? this.lon,
@ -83,7 +83,7 @@ class FireNotification {
return 'FireNotification {id: $id, lat: $lat, lon: $lon, when: $when, read: $read, subsId: $subsId, sealed ${ellipse(sealed)}';
}
static final Map<String, Route<Null>> routes = <String, Route<Null>>{};
static final Map<String, Route<void>> routes = <String, Route<void>>{};
Map<String, dynamic> toJson() => _$FireNotificationToJson(this);
/*