From 1e252625be474f339e276bba21d3a099d2bb1911 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 17 Jun 2023 09:31:05 +0200 Subject: [PATCH] neon: make Result immutable --- packages/neon/neon/lib/src/utils/result.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon/lib/src/utils/result.dart b/packages/neon/neon/lib/src/utils/result.dart index 73ef6d61..3a11a9ee 100644 --- a/packages/neon/neon/lib/src/utils/result.dart +++ b/packages/neon/neon/lib/src/utils/result.dart @@ -1,14 +1,15 @@ part of '../../neon.dart'; +@immutable class Result { - Result( + const Result( this.data, this.error, { required this.loading, required this.cached, }); - factory Result.loading() => Result( + factory Result.loading() => const Result( null, null, loading: true,