Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PageTransformer for flutter

License

NotificationsYou must be signed in to change notification settings

best-flutter/transformer_page_view

Repository files navigation

Build StatusPRs Welcomepub package

transformer_page_view

PageTransformer for flutter

Very simple to use

import 'package:transformer_page_view/transformer_page_view.dart';...new TransformerPageView(loop: true,transformer: new AccordionTransformer(),itemBuilder: (BuildContext context, int index) {  return new Container(    color: list[index%list.length],    child: new Center(      child: new Text("$index",style: new TextStyle(fontSize: 80.0,color: Colors.white),),    ),  );},itemCount: 3)

Almost the same as PageView.builder, simplely specify atransformer toTransformerPageView,which is a sub class ofPageTransformer

Show cases

Parallax

Welcome view

Basic

AccordionTransformer

See codehere

ThreeDTransformer

See codehere

ScaleAndFadeTransformer

See codehere

ZoomInPageTransformer

See codehere

ZoomOutPageTransformer

See codehere

DepthPageTransformer

See codehere

Getting Started

Installation

Add

transformer_page_view:

to your pubspec.yaml ,and run

flutter packages get

in your project's root directory.

Basic Usage

ParameterDefaultDescription
scrollDirectionAxis.horizontalIfAxis.horizontal, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
loopfalseSet totrue to enable continuous loop mode.
indexnoneIndex number of initial slide. if not set , it is controlled by the widget itself,otherwise, it is controlled by another widget, which is returned byitemBuilder
onPageChangedvoid onPageChanged(int index)Called with the new index when the user swiped
durationnew Duration(milliseconds:300)The milliseconds of every transaction animation costs
transformernoneThe most important property of this widget, it returns atransformed widget that based on the widget parameter. If the value is null, aitemBuilder must be specified
itemCountnoneNumber of the total items
itemBuildernoneA function that returns a widget based on index,if it's null,atransformer must be specified

Build-in Parallax

We provide 3 build-in parallaxes, which handle color、image and container

ParallaxColor

ParallaxColor handles the color transform, which controls the color transform from one to another.

ParallaxImage

ParallaxImage handles the image, which speed is slower than thePageView

ParallaxContainer

ParallaxContainer handles the text or other staff, which speed is faster than thePageView

3 build-in parallaxes are all used in subclass ofPageTransform,group these parallaxes together, we can create very cool things.

Inspired bypage-transformer, and we have an easier way to create this.

See codehere

Custom animation

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp