Replies: 8 comments 4 replies
-
|
GetView is a StatelessWidget and AutomaticKeepAliveClientMixin can be used only with StatefulWidget |
Beta Was this translation helpful? Give feedback.
-
|
I will reopen and move to discussions, because I think about implement this resource on future |
Beta Was this translation helpful? Give feedback.
-
/// Page - StatefulWidget
class TestPage extends StatefulWidget {
TestPage({Key? key}) : super(key: key);
@override
_TestPageState createState() => _TestPageState();
}
/// Page - State with AutomaticKeepAliveClientMixin
class _TestPageState extends State<TestPage>
with AutomaticKeepAliveClientMixin {
@override
Widget build(BuildContext context) {
return TestView();
}
@override
bool get wantKeepAlive => true;
}
/// GetView
class TestView extends GetView<TestController> {
@override
Widget build(BuildContext context) {
return Scaffold(body: Text('TestPage'));
}
}
/// Controller
class TestController extends GetxController {
} |
Beta Was this translation helpful? Give feedback.
-
|
any update? |
Beta Was this translation helpful? Give feedback.
-
|
It is been a year later |
Beta Was this translation helpful? Give feedback.
-
|
have any update for this issue ? |
Beta Was this translation helpful? Give feedback.
-
|
#822 (comment) the best answer! |
Beta Was this translation helpful? Give feedback.
-
|
Try this Change your existed view from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried
with AutomaticKeepAliveClientMixinbut get an error.What replace it? Thanks...
Beta Was this translation helpful? Give feedback.
All reactions