Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
andrflor
2022-08-26 16:49:29 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
faed0742943fdad5c4bfd8b7b49361369072034c
faed0742
1 parent
1246dc59
Fixed generic type and equality assert
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
lib/get_state_manager/src/rx_flutter/rx_notifier.dart
lib/get_utils/src/equality/equality.dart
lib/get_state_manager/src/rx_flutter/rx_notifier.dart
View file @
faed074
...
...
@@ -247,11 +247,11 @@ typedef NotifierBuilder<T> = Widget Function(T state);
abstract
class
GetStatus
<
T
>
with
Equality
{
const
GetStatus
();
factory
GetStatus
.
loading
()
=>
LoadingStatus
();
factory
GetStatus
.
error
(
String
message
)
=>
ErrorStatus
(
message
);
factory
GetStatus
.
empty
()
=>
EmptyStatus
();
factory
GetStatus
.
success
(
T
data
)
=>
SuccessStatus
(
data
);
factory
GetStatus
.
custom
()
=>
CustomStatus
();
factory
GetStatus
.
loading
()
=>
LoadingStatus
<
T
>();
factory
GetStatus
.
error
(
String
message
)
=>
ErrorStatus
<
T
,
String
>(
message
);
factory
GetStatus
.
empty
()
=>
EmptyStatus
<
T
>();
factory
GetStatus
.
success
(
T
data
)
=>
SuccessStatus
<
T
>(
data
);
factory
GetStatus
.
custom
()
=>
CustomStatus
<
T
>();
}
class
CustomStatus
<
T
>
extends
GetStatus
<
T
>
{
...
...
lib/get_utils/src/equality/equality.dart
View file @
faed074
...
...
@@ -8,7 +8,8 @@ mixin Equality {
@override
bool
operator
==(
dynamic
other
)
{
return
identical
(
this
,
other
)
||
const
DeepCollectionEquality
().
equals
(
props
,
other
.
props
);
runtimeType
==
other
.
runtimeType
&&
const
DeepCollectionEquality
().
equals
(
props
,
other
.
props
);
}
@override
...
...
Please
register
or
login
to post a comment