advanced_page_turn 0.0.3 icon indicating copy to clipboard operation
advanced_page_turn: ^0.0.3 copied to clipboard

A new Flutter project.

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);
        },
      ),
    );
  }
}



6
likes
100
pub points
43%
popularity

Publisher

unverified uploader

A new Flutter project.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on advanced_page_turn