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
Jonny Borges
2022-08-01 14:39:38 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bf66f6e379faaa3f43ffa36abcf7f710755aa4dd
bf66f6e3
1 parent
fc3cef49
add initialData to futurize
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
0 deletions
lib/get_state_manager/src/rx_flutter/rx_notifier.dart
lib/get_state_manager/src/rx_flutter/rx_notifier.dart
View file @
bf66f6e
...
...
@@ -74,6 +74,7 @@ mixin StateMixin<T> on ListNotifier {
void
futurize
(
Future
<
T
>
Function
()
body
,
{
T
?
initialData
,
String
?
errorMessage
,
bool
useEmpty
=
true
})
{
final
compute
=
body
;
_value
??=
initialData
;
compute
().
then
((
newValue
)
{
if
((
newValue
==
null
||
newValue
.
_isEmpty
())
&&
useEmpty
)
{
status
=
GetStatus
<
T
>.
loading
();
...
...
Please
register
or
login
to post a comment