Skip to content

Commit 5f09f9e

Browse files
committed
feat(user_presets): add @immutable annotation to SavedFilter model
- Import `meta` package to use `@immutable` annotation - Add `@immutable` annotation to `SavedFilter` class to indicate that it is intended to be immutable
1 parent cfedeb7 commit 5f09f9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/src/models/user_presets/saved_filter.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:core/src/models/entities/source.dart';
33
import 'package:core/src/models/entities/topic.dart';
44
import 'package:equatable/equatable.dart';
55
import 'package:json_annotation/json_annotation.dart';
6+
import 'package:meta/meta.dart';
67

78
part 'saved_filter.g.dart';
89

@@ -12,6 +13,7 @@ part 'saved_filter.g.dart';
1213
/// This model stores a named set of criteria, including topics, sources, and
1314
/// countries, allowing users to quickly re-apply complex filters.
1415
/// {@endtemplate}
16+
@immutable
1517
@JsonSerializable(explicitToJson: true, includeIfNull: true, checked: true)
1618
class SavedFilter extends Equatable {
1719
/// {@macro saved_filter}

0 commit comments

Comments
 (0)