Jonatas

fix typo on transition duration

... ... @@ -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);
}
... ...
... ... @@ -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(() {});
}
}
... ...