PageTransformer for flutter

Overview

Build Status PRs Welcome pub 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 a transformer to TransformerPageView, which is a sub class of PageTransformer

Show cases

Parallax

Welcome view

Basic

AccordionTransformer

See code here

ThreeDTransformer

See code here

ScaleAndFadeTransformer

See code here

ZoomInPageTransformer

See code here

ZoomOutPageTransformer

See code here

DepthPageTransformer

See code here

Getting Started

Installation

Add

transformer_page_view:

to your pubspec.yaml ,and run

flutter packages get 

in your project's root directory.

Basic Usage

Parameter Default Description
scrollDirection Axis.horizontal If Axis.horizontal, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
loop false Set to true to enable continuous loop mode.
index none Index number of initial slide. if not set , it is controlled by the widget itself,otherwise, it is controlled by another widget, which is returned by itemBuilder
onPageChanged void onPageChanged(int index) Called with the new index when the user swiped
duration new Duration(milliseconds:300) The milliseconds of every transaction animation costs
transformer none The most important property of this widget, it returns a transformed widget that based on the widget parameter. If the value is null, a itemBuilder must be specified
itemCount none Number of the total items
itemBuilder none A function that returns a widget based on index,if it's null,a transformer 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 the PageView

ParallaxContainer

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

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

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

See code here

Custom animation

Comments
  • use ]flutter_swiper plugins, throw this error

    use ]flutter_swiper plugins, throw this error

    Launching lib/main.dart on M811 in debug mode... Built build/app/outputs/apk/debug/app-debug.apk. I/flutter (10707): ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter (10707): The following NoSuchMethodError was thrown during a scheduler callback: I/flutter (10707): The method 'findRenderObject' was called on null. I/flutter (10707): Receiver: null I/flutter (10707): Tried calling: findRenderObject() I/flutter (10707): When the exception was thrown, this was the stack: I/flutter (10707): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) I/flutter (10707): #1 _TransformerPageViewState._onGetSize package:transformer_page_view/transformer_page_view.dart:455 I/flutter (10707): #2 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback package:flutter/…/scheduler/binding.dart:988 I/flutter (10707): #3 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame package:flutter/…/scheduler/binding.dart:936 I/flutter (10707): #4 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame package:flutter/…/scheduler/binding.dart:840 I/flutter (10707): #8 _invoke (dart:ui/hooks.dart:209:10) I/flutter (10707): #9 _drawFrame (dart:ui/hooks.dart:168:3) I/flutter (10707): (elided 3 frames from package dart:async) I/flutter (10707): ════════════════════════════════════════════════════════════════════════════════════════════════════

    opened by zileyuan 2
  • Unable to start

    Unable to start

    Hi guys, i get an issue just after installation of this plugin.

    Unable to find modules for some sources, this is usually the result of either a bad import, a missing dependency in a package (or possibly a dev_dependency needs to move to a real dependency), or a build failure (if importing a generated file).

    Please check the following imports:

    import 'package:transformer_page_view/transformer_page_view.dart'; from project|lib/pages/login/index.dart at 12:1

    Failed after 144ms

    After short debugging i noticed that in the plugin:

    ** Imports are made like this: import 'package:transformer_page_view/transformer_page_view.dart'; => Instead i think we you need to use related path : import './transformer_page_view.dart';

    After that, it starts working on the project when i put package files into the project without pubspec.yaml.

    But when i use pubspec.yaml to load the package it dosen't works even if i done these modifications.

    Could you please check this ?

    Other thing I'm using the Beta channel of Flutter;

    Thanks

    opened by soromamadou 1
  • Maximum Scrollable Page View

    Maximum Scrollable Page View

    Hi,

    I found that TransformerPageView has been limited to 40 pages in my app.

    I am still wondering, did it happen by design of this package, or it was caused from Sqlite query result which may limit the result by default.

    thanks

    opened by ejabu 1
  • There is no built-in transformer

    There is no built-in transformer

    I cleaned the project, checked the lib version (0.1.6) but it can't find transformers, also I've checked the downloaded files inside External Libraries and there is no transformer either.

    image

    I suggest add buildin_transformers.dart file inside the lib.

    opened by alizera 0
  • Migrate to null-safety

    Migrate to null-safety

    Migrate existing code to null-safety.

    Full Description Since last week, Flutter 2.0 hit stable branch. With 2.0 we've received Dart 2.12 with new sound null safety mechanism. Current transformer_page_view package doesn't support null-safety yet therefore migration is a must.

    Example Code Migration will touch most of the code. Key objectives here is to utilise dart migrate so all of the heavy lifting is done. And after that, run the build and fix places, that were fixed incorrectly by the tool.

    Platforms Migration will touch all of the platforms.

    Research Resources null-safety is unavoidable thus sooner or later it must be done. https://dart.dev/null-safety

    Additional This will be a heavy migration therefore careful code review is a must from one or more developers, after everything is done.

    opened by Zeswen 6
  • Reveal or Cover Content

    Reveal or Cover Content

    Any idea how to have a transition where the current content stays fixed in position and when you swipe, the new content gets revealed to cover the current/old content?

    Also, the other way around: Current/old content slides away and new content gets revealed under it.

    Thanks

    opened by jtkeyva 0
Owner
null
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
This is a Flutter URL preview plugin for Flutter that previews the content of a URL

flutter_link_preview This is a URL preview plugin that previews the content of a URL Language: English | 中文简体 Special feature Use multi-processing to

yung 67 Nov 2, 2022
Flutter liquid swipe - Liquid Swipe Animation Built With Flutter

Flutter Liquid Swipe liquid Swipe animation is amazing and its Created for iOS P

Jahongir Anvarov 6 Dec 1, 2022
A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

Debjeet Das 1 Apr 9, 2022
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. ?? Installing dependencies:

Jeremiah Ogbomo 2.7k Dec 30, 2022
A Flutter library for gradually painting SVG path objects on canvas (drawing line animation).

drawing_animation From static SVG assets See more examples in the showcasing app. Dynamically created from Path objects which are animated over time m

null 442 Dec 27, 2022
Flutter package for creating awesome animations.

?? Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. ?? fully tested ?? well documented ?? e

Felix Blaschke 879 Dec 31, 2022
Fun canvas animations in Flutter based on time and math functions.

funvas Flutter package that allows creating canvas animations based on time and math (mostly trigonometric) functions. The name "funvas" is based on F

null 472 Jan 9, 2023
A flutter package that adds support for vector data based animations.

animated_vector Description and inspiration A package that adds support for vector data based animations. The data format is heavily inspired from the

Potato Open Sauce Project 6 Apr 26, 2022
Flutter UI Challenges

Introduction ?? Zoo is a small, simple and beautiful app that lists 3d model of animals. Before we start, you can take a look at the app: Usage ?? To

Sanjeev Madhav 58 Dec 22, 2022
A Flutter app with flip animation to view profiles of friends. 🌟

Flip View Made with ?? in India This flutter app is based on the design made Dmytro Prudnikov for Yalantis on Dribble.He describes the design as: Just

Shubham Soni 68 Sep 23, 2022
Simple reactive animations in your Flutter apps.

just.motion Flutter package to create organic motion transitions. Why? The Motion Value stateless hot reload status notifier Ease Motion Spring Motion

Roi Peker 49 Nov 14, 2022
Timer UI animation challenge from 'Flutter Animations Masterclass'

stopwatch_flutter An IOS stopwatch challenge from Flutter Animations Masterclass - Full Course What I learned; Use timer Use ticker Create custom shap

Ali Riza Reisoglu 11 Jan 4, 2023
💙 Google Classroom Clone using Flutter, GCP

Introduction ?? Classroom is a Google Classroom clone built using ?? Flutter. Before we start, you can take a look at the app: Screenshots ?? Key Feat

Sanjeev Madhav 20 Dec 14, 2022
Animated Menu in Flutter using radial.

Animated_radial_Menu_in_Flutter Animated Menu in Flutter using radial. Getting Started This project is a starting point for a Flutter application. A f

Habib ullah 4 Jul 18, 2022
Cool 3D Drawer Animated With flutter part 2 🔥 🔥

Cool 3D Drawer Animated With flutter part 2 ?? ??

Hmida 12 Nov 22, 2022
🐱‍👤 Flutter-Animation 🔥 🔥 List Animated Staggered Animations

??‍?? Staggered Animations made with algeria ❤

Hmida 17 Nov 22, 2022
Flutter Animation 🐱‍👤 Made with algeria By DZ-TM071

Flutter Animation ??‍?? Made with algeria By DZ-TM071

Hmida 12 Oct 23, 2022
Flutter Animation 🐱‍👤 Made with algeria 🖤

Flutter-awesome-login-page-animated-fastCode ??‍?? Fast code and awesome design-ui for Login Page ! ?? Getting Started # First you need to add simple_

Hmida 11 Oct 24, 2022