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
Gabriel Rohden
2020-09-07 22:14:20 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
83e8afbed4290dbd8f6fcde6466cd3a9530e085f
83e8afbe
1 parent
8cfc22b2
chore: enable static analysis check on PRs
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
.github/workflows/main.yml
lib/src/state_manager/simple/get_state.dart
.github/workflows/main.yml
View file @
83e8afb
...
...
@@ -20,8 +20,7 @@ jobs:
flutter-version
:
'
1.20.2'
channel
:
'
stable'
-
run
:
flutter pub get
# run static analys code
#- run: flutter analyze
-
run
:
flutter analyze
# run flutter widgets tests and unit tests
-
run
:
flutter test --coverage
# Upload coverage reports to Codecov
...
...
lib/src/state_manager/simple/get_state.dart
View file @
83e8afb
...
...
@@ -27,6 +27,7 @@ typedef GetStateUpdate = bool Function();
// TODO: check performance HIT for the extra method call.
mixin
GetStateUpdaterMixin
<
T
extends
StatefulWidget
>
on
State
<
T
>
{
// To avoid the creation of an anonym function to be GC later.
// ignore: prefer_function_declarations_over_variables
static
final
VoidCallback
_stateCallback
=
()
{};
/// Experimental method to replace setState((){});
...
...
@@ -68,12 +69,11 @@ class GetxController extends DisposableInterface {
// for (final rs in _updatersGroupIds[id]) rs();
// }
ids
.
forEach
((
id
)
{
// _updatersIds[id]?.call(() {}); //<old>
// _updatersGroupIds[id]?.forEach((rs) => rs(() {})); //<old>
for
(
final
id
in
ids
)
{
_updatersIds
[
id
]?.
call
();
// ignore: avoid_function_literals_in_foreach_calls
_updatersGroupIds
[
id
]?.
forEach
((
rs
)
=>
rs
());
}
);
}
}
}
...
...
Please
register
or
login
to post a comment