flutter pageview show next page
PageView(
children: items,
controller: PageController(
viewportFraction: 0.8,
initialPage: 0,
)
)
flutter pageview show next page
PageView(
children: items,
controller: PageController(
viewportFraction: 0.8,
initialPage: 0,
)
)
flutter keep state of pageviews
import 'package:flutter/material.dart';
class KeepAlivePage extends StatefulWidget {
KeepAlivePage({
Key key,
@required this.child,
}) : super(key: key);
final Widget child;
@override
_KeepAlivePageState createState() => _KeepAlivePageState();
}
class _KeepAlivePageState extends State<KeepAlivePage>
with AutomaticKeepAliveClientMixin {
@override
Widget build(BuildContext context) {
/// Dont't forget this
super.build(context);
return widget.child;
}
@override
// TODO: implement wantKeepAlive
bool get wantKeepAlive => true;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us