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-12-24 20:12:53 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02a952ec6f51733fed34df8c986a86e3d1ed0501
02a952ec
1 parent
a5a16324
add supercontroller and improve upload time
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletions
example/lib/pages/home/presentation/controllers/home_controller.dart
example/lib/pages/home/presentation/controllers/home_controller.dart
View file @
02a952e
...
...
@@ -3,7 +3,7 @@ import 'package:get/get.dart';
import
'../../domain/adapters/repository_adapter.dart'
;
import
'../../domain/entity/cases_model.dart'
;
class
HomeController
extends
GetxController
with
StateMixin
<
CasesModel
>
{
class
HomeController
extends
SuperController
<
CasesModel
>
{
HomeController
({
this
.
homeRepository
});
/// inject repo abstraction dependency
...
...
@@ -21,4 +21,61 @@ class HomeController extends GetxController with StateMixin<CasesModel> {
change
(
null
,
status:
RxStatus
.
error
(
err
.
toString
()));
});
}
@override
void
onReady
()
{
print
(
'The build method is done. '
'Your controller is ready to call dialogs and snackbars'
);
super
.
onReady
();
}
@override
void
onClose
()
{
print
(
'onClose called'
);
super
.
onClose
();
}
@override
void
didChangeMetrics
()
{
print
(
'the window size did change'
);
super
.
didChangeMetrics
();
}
@override
void
didChangePlatformBrightness
()
{
print
(
'platform change ThemeMode'
);
super
.
didChangePlatformBrightness
();
}
@override
Future
<
bool
>
didPushRoute
(
String
route
)
{
print
(
'the route
$route
will be open'
);
return
super
.
didPushRoute
(
route
);
}
@override
Future
<
bool
>
didPopRoute
()
{
print
(
'the current route will be closed'
);
return
super
.
didPopRoute
();
}
@override
void
onDetached
()
{
print
(
'onDetached called'
);
}
@override
void
onInactive
()
{
print
(
'onInative called'
);
}
@override
void
onPaused
()
{
print
(
'onPaused called'
);
}
@override
void
onResumed
()
{
print
(
'onResumed called'
);
}
}
...
...
Please
register
or
login
to post a comment