0 purchases
advanced page turn
advanced_page_turn #
Advanced Page Turn Widget #
Add a advanced page turn effect to widgets in your app.
Created by Subhash Shukla @subhashDev121
Example #
import 'package:flutter/material.dart';
import 'package:advanced_page_turn/advanced_page_turn.dart';
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
final _controller = GlobalKey<AdvancedPageTurnState>();
@override
Widget build(BuildContext context) {
return Scaffold(
body: AdvancedPageTurn(
key: _controller,
backgroundColor: Colors.white,
showDragCutoff: false,
lastPage: Container(child: Center(child: Text('Last Page!'))),
children: <Widget>[
for (var i = 0; i < 20; i++) PageView(page: i),
],
initialIndex: 0,
onPageChanged: (int currentPage){
print("current page callback $currentPage");
},
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.search),
onPressed: () {
_controller.currentState!.goToPage(2);
},
),
);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.