From f77d758994199bf7e7a419b1db5184a9461ec2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Ma=C3=B1osa?= Date: Mon, 5 Feb 2024 00:16:50 +0100 Subject: [PATCH] =?UTF-8?q?perf(word):=20=E2=9A=A1=EF=B8=8F=20make=20class?= =?UTF-8?q?=20immutable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/model/word.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/model/word.dart b/lib/src/model/word.dart index c6223f7..c9721b0 100644 --- a/lib/src/model/word.dart +++ b/lib/src/model/word.dart @@ -1,9 +1,12 @@ +import 'package:flutter/foundation.dart' show immutable; + import 'definition_entry_sense.dart'; +@immutable final class Word { final String id; final String word; final List? senses; - Word({required this.id, required this.word, required this.senses}); + const Word({required this.id, required this.word, required this.senses}); }