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
Jonatas
2020-10-01 17:49:42 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
75a3e978d133b52d9f32b214a32ce4fc8fbe9a54
75a3e978
1 parent
02a07dd3
fix typo on transition duration
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
packages/get_navigation/lib/src/extension_navigation.dart
packages/get_state_manager/lib/src/simple/get_state.dart
packages/get_navigation/lib/src/extension_navigation.dart
View file @
75a3e97
...
...
@@ -806,7 +806,7 @@ extension GetNavigation on GetInterface {
Text
(
title
,
style:
TextStyle
(
color:
colorText
??
Colors
.
black
,
color:
colorText
??
theme
.
iconTheme
.
color
,
fontWeight:
FontWeight
.
w800
,
fontSize:
16
,
),
...
...
@@ -815,7 +815,7 @@ extension GetNavigation on GetInterface {
Text
(
message
,
style:
TextStyle
(
color:
colorText
??
Colors
.
black
,
color:
colorText
??
theme
.
iconTheme
.
color
,
fontWeight:
FontWeight
.
w300
,
fontSize:
14
,
),
...
...
@@ -924,6 +924,8 @@ extension GetNavigation on GetInterface {
restart
(
Get
.
context
as
Element
);
}
void
appUpdate
()
=>
getxController
.
update
();
void
changeTheme
(
ThemeData
theme
)
{
getxController
.
setTheme
(
theme
);
}
...
...
packages/get_state_manager/lib/src/simple/get_state.dart
View file @
75a3e97
...
...
@@ -23,16 +23,14 @@ typedef GetStateUpdate = void Function();
/// Avoids the potential (but extremely unlikely) issue of having
/// the Widget in a dispose() state, and abstracts the
/// API from the ugly fn((){}).
// 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((){});
/// Used with GetStateUpdate.
void
getUpdate
()
{
if
(
mounted
)
setState
(
_stateCallback
);
if
(
mounted
)
setState
(
()
{}
);
}
}
...
...
Please
register
or
login
to post a comment