Skip to content

Page Turn Widget - Add a page turn effect to widgets in your app. Maintainer: @rodydavis

License

Notifications You must be signed in to change notification settings

Mantano/page_turn

 
 

Repository files navigation

THIS VERSION IS JUST A WORK IN PROGRESS, DON'T USE IT FOR NOW!

Page Turn Widget

Add a page turn effect to widgets in your app.

Originally created by Simon Lightfoot @slightfoot

Screenshots

info info info

Example

import 'package:flutter/material.dart';

import 'package:page_turn/page_turn.dart';

import '../common/index.dart';

class HomeScreen extends StatefulWidget {
  const HomeScreen({
    Key key,
  }) : super(key: key);

  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  final _controller = GlobalKey<PageTurnState>();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PageTurn(
        key: _controller,
        backgroundColor: Colors.white,
        showDragCutoff: false,
        lastPage: Container(child: Center(child: Text('Last Page!'))),
        children: <Widget>[
          for (var i = 0; i < 20; i++) AlicePage(page: i),
        ],
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.search),
        onPressed: () {
          _controller.currentState.goToPage(2);
        },
      ),
    );
  }
}

About

Page Turn Widget - Add a page turn effect to widgets in your app. Maintainer: @rodydavis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 93.2%
  • Swift 3.2%
  • HTML 3.1%
  • Other 0.5%