Browse Source

neon: make Result immutable

pull/395/head
Nikolas Rimikis 1 year ago
parent
commit
1e252625be
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 5
      packages/neon/neon/lib/src/utils/result.dart

5
packages/neon/neon/lib/src/utils/result.dart

@ -1,14 +1,15 @@
part of '../../neon.dart'; part of '../../neon.dart';
@immutable
class Result<T> { class Result<T> {
Result( const Result(
this.data, this.data,
this.error, { this.error, {
required this.loading, required this.loading,
required this.cached, required this.cached,
}); });
factory Result.loading() => Result( factory Result.loading() => const Result(
null, null,
null, null,
loading: true, loading: true,

Loading…
Cancel
Save